aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/refcounttree.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-04-26 18:48:49 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-26 20:22:07 -0400
commit9ec3a646fe09970f801ab15e0f1694060b9f19af (patch)
tree697058ca7e1671eda180a3ccc62445686fbc1a31 /fs/ocfs2/refcounttree.c
parentc8b3fd0ce313443731e8fd6d5a541085eb465f99 (diff)
parent3cab989afd8d8d1bc3d99fef0e7ed87c31e7b647 (diff)
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
Diffstat (limited to 'fs/ocfs2/refcounttree.c')
-rw-r--r--fs/ocfs2/refcounttree.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c
index df3a500789c7..d8c6af101f3f 100644
--- a/fs/ocfs2/refcounttree.c
+++ b/fs/ocfs2/refcounttree.c
@@ -4194,7 +4194,7 @@ static int __ocfs2_reflink(struct dentry *old_dentry,
4194 bool preserve) 4194 bool preserve)
4195{ 4195{
4196 int ret; 4196 int ret;
4197 struct inode *inode = old_dentry->d_inode; 4197 struct inode *inode = d_inode(old_dentry);
4198 struct buffer_head *new_bh = NULL; 4198 struct buffer_head *new_bh = NULL;
4199 4199
4200 if (OCFS2_I(inode)->ip_flags & OCFS2_INODE_SYSTEM_FILE) { 4200 if (OCFS2_I(inode)->ip_flags & OCFS2_INODE_SYSTEM_FILE) {
@@ -4263,7 +4263,7 @@ static int ocfs2_reflink(struct dentry *old_dentry, struct inode *dir,
4263 struct dentry *new_dentry, bool preserve) 4263 struct dentry *new_dentry, bool preserve)
4264{ 4264{
4265 int error; 4265 int error;
4266 struct inode *inode = old_dentry->d_inode; 4266 struct inode *inode = d_inode(old_dentry);
4267 struct buffer_head *old_bh = NULL; 4267 struct buffer_head *old_bh = NULL;
4268 struct inode *new_orphan_inode = NULL; 4268 struct inode *new_orphan_inode = NULL;
4269 struct posix_acl *default_acl, *acl; 4269 struct posix_acl *default_acl, *acl;
@@ -4357,7 +4357,7 @@ out:
4357/* copied from may_create in VFS. */ 4357/* copied from may_create in VFS. */
4358static inline int ocfs2_may_create(struct inode *dir, struct dentry *child) 4358static inline int ocfs2_may_create(struct inode *dir, struct dentry *child)
4359{ 4359{
4360 if (child->d_inode) 4360 if (d_really_is_positive(child))
4361 return -EEXIST; 4361 return -EEXIST;
4362 if (IS_DEADDIR(dir)) 4362 if (IS_DEADDIR(dir))
4363 return -ENOENT; 4363 return -ENOENT;
@@ -4375,7 +4375,7 @@ static inline int ocfs2_may_create(struct inode *dir, struct dentry *child)
4375static int ocfs2_vfs_reflink(struct dentry *old_dentry, struct inode *dir, 4375static int ocfs2_vfs_reflink(struct dentry *old_dentry, struct inode *dir,
4376 struct dentry *new_dentry, bool preserve) 4376 struct dentry *new_dentry, bool preserve)
4377{ 4377{
4378 struct inode *inode = old_dentry->d_inode; 4378 struct inode *inode = d_inode(old_dentry);
4379 int error; 4379 int error;
4380 4380
4381 if (!inode) 4381 if (!inode)
@@ -4463,7 +4463,7 @@ int ocfs2_reflink_ioctl(struct inode *inode,
4463 } 4463 }
4464 4464
4465 error = ocfs2_vfs_reflink(old_path.dentry, 4465 error = ocfs2_vfs_reflink(old_path.dentry,
4466 new_path.dentry->d_inode, 4466 d_inode(new_path.dentry),
4467 new_dentry, preserve); 4467 new_dentry, preserve);
4468out_dput: 4468out_dput:
4469 done_path_create(&new_path, new_dentry); 4469 done_path_create(&new_path, new_dentry);