From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sage Weil Subject: [PATCH 14/18] nfs: remove unnecessary dentry_unhash on rmdir/rename_dir Date: Mon, 9 May 2011 21:43:32 -0700 Message-ID: <1305002616-16782-15-git-send-email-sage@newdream.net> References: <1305002616-16782-1-git-send-email-sage@newdream.net> Cc: Sage Weil , Trond Myklebust , linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: viro-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org, hch-jcswGhMUV9g@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Return-path: In-Reply-To: <1305002616-16782-1-git-send-email-sage-BnTBU8nroG7k1uMJSBkQmQ@public.gmane.org> Sender: linux-nfs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-fsdevel.vger.kernel.org NFS has no problems with lingering references to unlinked directory inodes. CC: Trond Myklebust CC: linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Signed-off-by: Sage Weil --- 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 87daf79..7237672 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) dfprintk(VFS, "NFS: rmdir(%s/%ld), %s\n", dir->i_sb->s_id, dir->i_ino, dentry->d_name.name); - dentry_unhash(dentry); - error = NFS_PROTO(dir)->rmdir(dir, &dentry->d_name); /* Ensure the VFS deletes this inode */ if (error == 0 && dentry->d_inode != NULL) @@ -1959,9 +1957,6 @@ static int nfs_rename(struct inode *old_dir, struct dentry *old_dentry, new_dentry->d_parent->d_name.name, new_dentry->d_name.name, new_dentry->d_count); - if (new_inode && S_ISDIR(new_inode->i_mode)) - dentry_unhash(new_dentry); - /* * For non-directories, check whether the target is busy and if so, * make a copy of the dentry and then do a silly-rename. If the -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html