summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2008-02-21 18:00:00 +0100
committerMark Fasheh <mark.fasheh@oracle.com>2008-02-28 16:55:45 -0800
commit76383196c7e816a8631e2159d76bfc40b2752856 (patch)
tree47bec6ef51f41d32dd203bbe7a467bf118f55114 /fs
parent7704a8b6fc4a8f51599eb2af4dcf1e2ac9c7e576 (diff)
[PATCH] 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: Jan Kara <jack@suse.cz> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/ocfs2/namei.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c
index ae9ad9587516..8393485c05c7 100644
--- a/fs/ocfs2/namei.c
+++ b/fs/ocfs2/namei.c
@@ -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
* rename lock. */
- if (old_dentry != new_dentry) {
+ if (old_dir != new_dir && S_ISDIR(old_inode->i_mode)) {
status = ocfs2_rename_lock(osb);
if (status < 0) {
mlog_errno(status);