Commit 5dabd695 authored by Jan Kara's avatar Jan Kara Committed by Mark Fasheh

ocfs2: Improve rename locking

ocfs2_rename() was being too aggressive with the rename lock - we only need
it for certain forms of directory rename.
Signed-off-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarMark Fasheh <mfasheh@suse.com>
parent 58dadcdb
...@@ -997,7 +997,7 @@ static int ocfs2_rename(struct inode *old_dir, ...@@ -997,7 +997,7 @@ static int ocfs2_rename(struct inode *old_dir,
* *
* And that's why, just like the VFS, we need a file system * And that's why, just like the VFS, we need a file system
* rename lock. */ * rename lock. */
if (old_dentry != new_dentry) { if (old_dir != new_dir && S_ISDIR(old_inode->i_mode)) {
status = ocfs2_rename_lock(osb); status = ocfs2_rename_lock(osb);
if (status < 0) { if (status < 0) {
mlog_errno(status); mlog_errno(status);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment