aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/dir.c
diff options
context:
space:
mode:
authorMark Fasheh <mark.fasheh@oracle.com>2006-09-08 17:22:21 -0400
committerMark Fasheh <mark.fasheh@oracle.com>2006-09-24 16:50:45 -0400
commit349457ccf2592c14bdf13b6706170ae2e94931b1 (patch)
tree3670945b5a62617d38cf1f317487387032d3da4d /fs/nfs/dir.c
parent1390334b4c697b7588d5661fcf6acaeec409cf4c (diff)
[PATCH] Allow file systems to manually d_move() inside of ->rename()
Some file systems want to manually d_move() the dentries involved in a rename. We can do this by making use of the FS_ODD_RENAME flag if we just have nfs_rename() unconditionally do the d_move(). While there, we rename the flag to be more descriptive. OCFS2 uses this to protect that part of the rename operation with a cluster lock. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@osdl.org>
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r--fs/nfs/dir.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 3419c2da9ba9..7432f1a43f3d 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1669,8 +1669,7 @@ out:
1669 if (rehash) 1669 if (rehash)
1670 d_rehash(rehash); 1670 d_rehash(rehash);
1671 if (!error) { 1671 if (!error) {
1672 if (!S_ISDIR(old_inode->i_mode)) 1672 d_move(old_dentry, new_dentry);
1673 d_move(old_dentry, new_dentry);
1674 nfs_renew_times(new_dentry); 1673 nfs_renew_times(new_dentry);
1675 nfs_set_verifier(new_dentry, nfs_save_change_attribute(new_dir)); 1674 nfs_set_verifier(new_dentry, nfs_save_change_attribute(new_dir));
1676 } 1675 }