aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/refcounttree.c
diff options
context:
space:
mode:
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 ee541f92dab4..2dc801255c4d 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);