mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull fourth vfs update from Al Viro: "d_inode() annotations from David Howells (sat in for-next since before the beginning of merge window) + four assorted fixes" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: RCU pathwalk breakage when running into a symlink overmounting something fix I_DIO_WAKEUP definition direct-io: only inc/dec inode->i_dio_count for file systems fs/9p: fix readdir() VFS: assorted d_backing_inode() annotations VFS: fs/inode.c helpers: d_inode() annotations VFS: fs/cachefiles: d_backing_inode() annotations VFS: fs library helpers: d_inode() annotations VFS: assorted weird filesystems: d_inode() annotations VFS: normal filesystems (and lustre): d_inode() annotations VFS: security/: d_inode() annotations VFS: security/: d_backing_inode() annotations VFS: net/: d_inode() annotations VFS: net/unix: d_backing_inode() annotations VFS: kernel/: d_inode() annotations VFS: audit: d_backing_inode() annotations VFS: Fix up some ->d_inode accesses in the chelsio driver VFS: Cachefiles should perform fs modifications on the top layer only VFS: AF_UNIX sockets should call mknod on the top layer only
This commit is contained in:
commit
9ec3a646fe
343 changed files with 1877 additions and 1867 deletions
|
|
@ -247,7 +247,7 @@ static int v9fs_xattr_get_acl(struct dentry *dentry, const char *name,
|
|||
if ((v9ses->flags & V9FS_ACCESS_MASK) != V9FS_ACCESS_CLIENT)
|
||||
return v9fs_remote_get_acl(dentry, name, buffer, size, type);
|
||||
|
||||
acl = v9fs_get_cached_acl(dentry->d_inode, type);
|
||||
acl = v9fs_get_cached_acl(d_inode(dentry), type);
|
||||
if (IS_ERR(acl))
|
||||
return PTR_ERR(acl);
|
||||
if (acl == NULL)
|
||||
|
|
@ -285,7 +285,7 @@ static int v9fs_xattr_set_acl(struct dentry *dentry, const char *name,
|
|||
int retval;
|
||||
struct posix_acl *acl;
|
||||
struct v9fs_session_info *v9ses;
|
||||
struct inode *inode = dentry->d_inode;
|
||||
struct inode *inode = d_inode(dentry);
|
||||
|
||||
if (strcmp(name, "") != 0)
|
||||
return -EINVAL;
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ static int v9fs_cached_dentry_delete(const struct dentry *dentry)
|
|||
dentry, dentry);
|
||||
|
||||
/* Don't cache negative dentries */
|
||||
if (!dentry->d_inode)
|
||||
if (d_really_is_negative(dentry))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -83,7 +83,7 @@ static int v9fs_lookup_revalidate(struct dentry *dentry, unsigned int flags)
|
|||
if (flags & LOOKUP_RCU)
|
||||
return -ECHILD;
|
||||
|
||||
inode = dentry->d_inode;
|
||||
inode = d_inode(dentry);
|
||||
if (!inode)
|
||||
goto out_valid;
|
||||
|
||||
|
|
|
|||
|
|
@ -138,6 +138,8 @@ static int v9fs_dir_readdir(struct file *file, struct dir_context *ctx)
|
|||
&err);
|
||||
if (err)
|
||||
return err;
|
||||
if (n == 0)
|
||||
return 0;
|
||||
|
||||
rdir->head = 0;
|
||||
rdir->tail = n;
|
||||
|
|
|
|||
|
|
@ -595,7 +595,7 @@ static int v9fs_remove(struct inode *dir, struct dentry *dentry, int flags)
|
|||
dir, dentry, flags);
|
||||
|
||||
v9ses = v9fs_inode2v9ses(dir);
|
||||
inode = dentry->d_inode;
|
||||
inode = d_inode(dentry);
|
||||
dfid = v9fs_fid_lookup(dentry->d_parent);
|
||||
if (IS_ERR(dfid)) {
|
||||
retval = PTR_ERR(dfid);
|
||||
|
|
@ -864,7 +864,7 @@ v9fs_vfs_atomic_open(struct inode *dir, struct dentry *dentry,
|
|||
}
|
||||
|
||||
/* Only creates */
|
||||
if (!(flags & O_CREAT) || dentry->d_inode)
|
||||
if (!(flags & O_CREAT) || d_really_is_positive(dentry))
|
||||
return finish_no_open(file, res);
|
||||
|
||||
err = 0;
|
||||
|
|
@ -881,7 +881,7 @@ v9fs_vfs_atomic_open(struct inode *dir, struct dentry *dentry,
|
|||
}
|
||||
|
||||
v9fs_invalidate_inode_attr(dir);
|
||||
v9inode = V9FS_I(dentry->d_inode);
|
||||
v9inode = V9FS_I(d_inode(dentry));
|
||||
mutex_lock(&v9inode->v_mutex);
|
||||
if ((v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE) &&
|
||||
!v9inode->writeback_fid &&
|
||||
|
|
@ -908,7 +908,7 @@ v9fs_vfs_atomic_open(struct inode *dir, struct dentry *dentry,
|
|||
|
||||
file->private_data = fid;
|
||||
if (v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE)
|
||||
v9fs_cache_inode_set_cookie(dentry->d_inode, file);
|
||||
v9fs_cache_inode_set_cookie(d_inode(dentry), file);
|
||||
|
||||
*opened |= FILE_CREATED;
|
||||
out:
|
||||
|
|
@ -969,8 +969,8 @@ v9fs_vfs_rename(struct inode *old_dir, struct dentry *old_dentry,
|
|||
|
||||
p9_debug(P9_DEBUG_VFS, "\n");
|
||||
retval = 0;
|
||||
old_inode = old_dentry->d_inode;
|
||||
new_inode = new_dentry->d_inode;
|
||||
old_inode = d_inode(old_dentry);
|
||||
new_inode = d_inode(new_dentry);
|
||||
v9ses = v9fs_inode2v9ses(old_inode);
|
||||
oldfid = v9fs_fid_lookup(old_dentry);
|
||||
if (IS_ERR(oldfid))
|
||||
|
|
@ -1061,7 +1061,7 @@ v9fs_vfs_getattr(struct vfsmount *mnt, struct dentry *dentry,
|
|||
p9_debug(P9_DEBUG_VFS, "dentry: %p\n", dentry);
|
||||
v9ses = v9fs_dentry2v9ses(dentry);
|
||||
if (v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE) {
|
||||
generic_fillattr(dentry->d_inode, stat);
|
||||
generic_fillattr(d_inode(dentry), stat);
|
||||
return 0;
|
||||
}
|
||||
fid = v9fs_fid_lookup(dentry);
|
||||
|
|
@ -1072,8 +1072,8 @@ v9fs_vfs_getattr(struct vfsmount *mnt, struct dentry *dentry,
|
|||
if (IS_ERR(st))
|
||||
return PTR_ERR(st);
|
||||
|
||||
v9fs_stat2inode(st, dentry->d_inode, dentry->d_inode->i_sb);
|
||||
generic_fillattr(dentry->d_inode, stat);
|
||||
v9fs_stat2inode(st, d_inode(dentry), d_inode(dentry)->i_sb);
|
||||
generic_fillattr(d_inode(dentry), stat);
|
||||
|
||||
p9stat_free(st);
|
||||
kfree(st);
|
||||
|
|
@ -1095,7 +1095,7 @@ static int v9fs_vfs_setattr(struct dentry *dentry, struct iattr *iattr)
|
|||
struct p9_wstat wstat;
|
||||
|
||||
p9_debug(P9_DEBUG_VFS, "\n");
|
||||
retval = inode_change_ok(dentry->d_inode, iattr);
|
||||
retval = inode_change_ok(d_inode(dentry), iattr);
|
||||
if (retval)
|
||||
return retval;
|
||||
|
||||
|
|
@ -1128,20 +1128,20 @@ static int v9fs_vfs_setattr(struct dentry *dentry, struct iattr *iattr)
|
|||
|
||||
/* Write all dirty data */
|
||||
if (d_is_reg(dentry))
|
||||
filemap_write_and_wait(dentry->d_inode->i_mapping);
|
||||
filemap_write_and_wait(d_inode(dentry)->i_mapping);
|
||||
|
||||
retval = p9_client_wstat(fid, &wstat);
|
||||
if (retval < 0)
|
||||
return retval;
|
||||
|
||||
if ((iattr->ia_valid & ATTR_SIZE) &&
|
||||
iattr->ia_size != i_size_read(dentry->d_inode))
|
||||
truncate_setsize(dentry->d_inode, iattr->ia_size);
|
||||
iattr->ia_size != i_size_read(d_inode(dentry)))
|
||||
truncate_setsize(d_inode(dentry), iattr->ia_size);
|
||||
|
||||
v9fs_invalidate_inode_attr(dentry->d_inode);
|
||||
v9fs_invalidate_inode_attr(d_inode(dentry));
|
||||
|
||||
setattr_copy(dentry->d_inode, iattr);
|
||||
mark_inode_dirty(dentry->d_inode);
|
||||
setattr_copy(d_inode(dentry), iattr);
|
||||
mark_inode_dirty(d_inode(dentry));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1403,7 +1403,7 @@ v9fs_vfs_link(struct dentry *old_dentry, struct inode *dir,
|
|||
retval = v9fs_vfs_mkspecial(dir, dentry, P9_DMLINK, name);
|
||||
__putname(name);
|
||||
if (!retval) {
|
||||
v9fs_refresh_inode(oldfid, old_dentry->d_inode);
|
||||
v9fs_refresh_inode(oldfid, d_inode(old_dentry));
|
||||
v9fs_invalidate_inode_attr(dir);
|
||||
}
|
||||
clunk_fid:
|
||||
|
|
|
|||
|
|
@ -265,7 +265,7 @@ v9fs_vfs_atomic_open_dotl(struct inode *dir, struct dentry *dentry,
|
|||
}
|
||||
|
||||
/* Only creates */
|
||||
if (!(flags & O_CREAT) || dentry->d_inode)
|
||||
if (!(flags & O_CREAT) || d_really_is_positive(dentry))
|
||||
return finish_no_open(file, res);
|
||||
|
||||
v9ses = v9fs_inode2v9ses(dir);
|
||||
|
|
@ -481,7 +481,7 @@ v9fs_vfs_getattr_dotl(struct vfsmount *mnt, struct dentry *dentry,
|
|||
p9_debug(P9_DEBUG_VFS, "dentry: %p\n", dentry);
|
||||
v9ses = v9fs_dentry2v9ses(dentry);
|
||||
if (v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE) {
|
||||
generic_fillattr(dentry->d_inode, stat);
|
||||
generic_fillattr(d_inode(dentry), stat);
|
||||
return 0;
|
||||
}
|
||||
fid = v9fs_fid_lookup(dentry);
|
||||
|
|
@ -496,8 +496,8 @@ v9fs_vfs_getattr_dotl(struct vfsmount *mnt, struct dentry *dentry,
|
|||
if (IS_ERR(st))
|
||||
return PTR_ERR(st);
|
||||
|
||||
v9fs_stat2inode_dotl(st, dentry->d_inode);
|
||||
generic_fillattr(dentry->d_inode, stat);
|
||||
v9fs_stat2inode_dotl(st, d_inode(dentry));
|
||||
generic_fillattr(d_inode(dentry), stat);
|
||||
/* Change block size to what the server returned */
|
||||
stat->blksize = st->st_blksize;
|
||||
|
||||
|
|
@ -557,7 +557,7 @@ int v9fs_vfs_setattr_dotl(struct dentry *dentry, struct iattr *iattr)
|
|||
int retval;
|
||||
struct p9_fid *fid;
|
||||
struct p9_iattr_dotl p9attr;
|
||||
struct inode *inode = dentry->d_inode;
|
||||
struct inode *inode = d_inode(dentry);
|
||||
|
||||
p9_debug(P9_DEBUG_VFS, "\n");
|
||||
|
||||
|
|
@ -795,10 +795,10 @@ v9fs_vfs_link_dotl(struct dentry *old_dentry, struct inode *dir,
|
|||
if (IS_ERR(fid))
|
||||
return PTR_ERR(fid);
|
||||
|
||||
v9fs_refresh_inode_dotl(fid, old_dentry->d_inode);
|
||||
v9fs_refresh_inode_dotl(fid, d_inode(old_dentry));
|
||||
}
|
||||
ihold(old_dentry->d_inode);
|
||||
d_instantiate(dentry, old_dentry->d_inode);
|
||||
ihold(d_inode(old_dentry));
|
||||
d_instantiate(dentry, d_inode(old_dentry));
|
||||
|
||||
return err;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -168,8 +168,8 @@ static struct dentry *v9fs_mount(struct file_system_type *fs_type, int flags,
|
|||
retval = PTR_ERR(st);
|
||||
goto release_sb;
|
||||
}
|
||||
root->d_inode->i_ino = v9fs_qid2ino(&st->qid);
|
||||
v9fs_stat2inode_dotl(st, root->d_inode);
|
||||
d_inode(root)->i_ino = v9fs_qid2ino(&st->qid);
|
||||
v9fs_stat2inode_dotl(st, d_inode(root));
|
||||
kfree(st);
|
||||
} else {
|
||||
struct p9_wstat *st = NULL;
|
||||
|
|
@ -179,8 +179,8 @@ static struct dentry *v9fs_mount(struct file_system_type *fs_type, int flags,
|
|||
goto release_sb;
|
||||
}
|
||||
|
||||
root->d_inode->i_ino = v9fs_qid2ino(&st->qid);
|
||||
v9fs_stat2inode(st, root->d_inode, sb);
|
||||
d_inode(root)->i_ino = v9fs_qid2ino(&st->qid);
|
||||
v9fs_stat2inode(st, d_inode(root), sb);
|
||||
|
||||
p9stat_free(st);
|
||||
kfree(st);
|
||||
|
|
|
|||
Loading…
Reference in a new issue