[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>
This commit is contained in:
Mark Fasheh
2006-09-08 14:22:21 -07:00
parent 1390334b4c
commit 349457ccf2
4 changed files with 13 additions and 13 deletions

View File

@@ -1669,8 +1669,7 @@ out:
if (rehash)
d_rehash(rehash);
if (!error) {
if (!S_ISDIR(old_inode->i_mode))
d_move(old_dentry, new_dentry);
d_move(old_dentry, new_dentry);
nfs_renew_times(new_dentry);
nfs_set_verifier(new_dentry, nfs_save_change_attribute(new_dir));
}