From patchwork Tue May 10 04:43:32 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sage Weil X-Patchwork-Id: 772682 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p4A5BFK4003943 for ; Tue, 10 May 2011 05:11:17 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754190Ab1EJFLO (ORCPT ); Tue, 10 May 2011 01:11:14 -0400 Received: from cobra.newdream.net ([66.33.216.30]:57319 "EHLO cobra.newdream.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753661Ab1EJFK4 (ORCPT ); Tue, 10 May 2011 01:10:56 -0400 Received: from vapre.ww.newdream.net (dsl092-035-022.lax1.dsl.speakeasy.net [66.92.35.22]) by cobra.newdream.net (Postfix) with ESMTPA id 6AAB8BC670; Mon, 9 May 2011 22:11:37 -0700 (PDT) From: Sage Weil To: viro@ZenIV.linux.org.uk, hch@lst.de, linux-fsdevel@vger.kernel.org Cc: Sage Weil , Trond Myklebust , linux-nfs@vger.kernel.org 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> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1305002616-16782-1-git-send-email-sage@newdream.net> References: <1305002616-16782-1-git-send-email-sage@newdream.net> Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Tue, 10 May 2011 05:11:17 +0000 (UTC) NFS has no problems with lingering references to unlinked directory inodes. CC: Trond Myklebust CC: linux-nfs@vger.kernel.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