aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2008-02-21 18:00:00 +0100
committerMark Fasheh <mfasheh@suse.com>2008-04-18 08:56:11 -0700
commit5dabd69515765156605b09261abf969236a77803 (patch)
tree4a44a7554c9513f012c4140793d1620001809999 /fs
parent58dadcdbc2584db050969f9781727fc5a3f618db (diff)
downloadkernel_samsung_smdk4412-5dabd69515765156605b09261abf969236a77803.zip
kernel_samsung_smdk4412-5dabd69515765156605b09261abf969236a77803.tar.gz
kernel_samsung_smdk4412-5dabd69515765156605b09261abf969236a77803.tar.bz2
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 <mfasheh@suse.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 ab5a227..d5d808f 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);