summaryrefslogtreecommitdiff
path: root/fs/aufs/i_op_ren.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/aufs/i_op_ren.c')
-rw-r--r--fs/aufs/i_op_ren.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/aufs/i_op_ren.c b/fs/aufs/i_op_ren.c
index 652e973ce..fd815fdbc 100644
--- a/fs/aufs/i_op_ren.c
+++ b/fs/aufs/i_op_ren.c
@@ -829,11 +829,9 @@ int aufs_rename(struct inode *_src_dir, struct dentry *_src_dentry,
if (unlikely(d_really_is_positive(a->dst_dentry)
&& !d_is_dir(a->dst_dentry)))
goto out_free;
- err = aufs_read_and_write_lock2(a->dst_dentry, a->src_dentry,
- AuLock_DIR | flags);
- } else
- err = aufs_read_and_write_lock2(a->dst_dentry, a->src_dentry,
- flags);
+ flags |= AuLock_DIRS;
+ }
+ err = aufs_read_and_write_lock2(a->dst_dentry, a->src_dentry, flags);
if (unlikely(err))
goto out_free;