diff options
author | Sage Weil <sage@newdream.net> | 2011-05-24 16:06:19 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-05-26 07:26:57 -0400 |
commit | 052e2a1ba2d07e724ae9cc0608389292276cb77a (patch) | |
tree | 415a5609e6112031a236dba245b27fe59131cf04 | |
parent | 5afcb940fa37f57d124155f30a1a8d7794a476e0 (diff) |
nfs: remove unnecessary dentry_unhash on rmdir/rename_dir
NFS has no problems with lingering references to unlinked directory
inodes.
CC: Trond Myklebust <Trond.Myklebust@netapp.com>
CC: linux-nfs@vger.kernel.org
Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | fs/nfs/dir.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 87daf7982186..7237672216c8 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c | |||
@@ -1748,8 +1748,6 @@ static int nfs_rmdir(struct inode *dir, struct dentry *dentry) | |||
1748 | dfprintk(VFS, "NFS: rmdir(%s/%ld), %s\n", | 1748 | dfprintk(VFS, "NFS: rmdir(%s/%ld), %s\n", |
1749 | dir->i_sb->s_id, dir->i_ino, dentry->d_name.name); | 1749 | dir->i_sb->s_id, dir->i_ino, dentry->d_name.name); |
1750 | 1750 | ||
1751 | dentry_unhash(dentry); | ||
1752 | |||
1753 | error = NFS_PROTO(dir)->rmdir(dir, &dentry->d_name); | 1751 | error = NFS_PROTO(dir)->rmdir(dir, &dentry->d_name); |
1754 | /* Ensure the VFS deletes this inode */ | 1752 | /* Ensure the VFS deletes this inode */ |
1755 | if (error == 0 && dentry->d_inode != NULL) | 1753 | if (error == 0 && dentry->d_inode != NULL) |
@@ -1959,9 +1957,6 @@ static int nfs_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
1959 | new_dentry->d_parent->d_name.name, new_dentry->d_name.name, | 1957 | new_dentry->d_parent->d_name.name, new_dentry->d_name.name, |
1960 | new_dentry->d_count); | 1958 | new_dentry->d_count); |
1961 | 1959 | ||
1962 | if (new_inode && S_ISDIR(new_inode->i_mode)) | ||
1963 | dentry_unhash(new_dentry); | ||
1964 | |||
1965 | /* | 1960 | /* |
1966 | * For non-directories, check whether the target is busy and if so, | 1961 | * For non-directories, check whether the target is busy and if so, |
1967 | * make a copy of the dentry and then do a silly-rename. If the | 1962 | * make a copy of the dentry and then do a silly-rename. If the |