From patchwork Tue May 10 04:43:28 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sage Weil X-Patchwork-Id: 772662 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 p4A5B7s9003756 for ; Tue, 10 May 2011 05:11:08 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753697Ab1EJFK5 (ORCPT ); Tue, 10 May 2011 01:10:57 -0400 Received: from cobra.newdream.net ([66.33.216.30]:57299 "EHLO cobra.newdream.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752977Ab1EJFKq (ORCPT ); Tue, 10 May 2011 01:10:46 -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 517FFBC96A; Mon, 9 May 2011 22:11:31 -0700 (PDT) From: Sage Weil To: viro@ZenIV.linux.org.uk, hch@lst.de, linux-fsdevel@vger.kernel.org Cc: Sage Weil , Chris Mason , linux-btrfs@vger.kernel.org Subject: [PATCH 10/18] btrfs: remove unnecessary dentry_unhash in rmdir/rename_dir Date: Mon, 9 May 2011 21:43:28 -0700 Message-Id: <1305002616-16782-11-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-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@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:08 +0000 (UTC) Btrfs has no problems with lingering references to unlinked directory inodes. CC: Chris Mason CC: linux-btrfs@vger.kernel.org Signed-off-by: Sage Weil --- fs/btrfs/inode.c | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 3a33ae3..7cd8ab0 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -3062,8 +3062,6 @@ static int btrfs_rmdir(struct inode *dir, struct dentry *dentry) inode->i_ino == BTRFS_FIRST_FREE_OBJECTID) return -ENOTEMPTY; - dentry_unhash(dentry); - trans = __unlink_start_trans(dir, dentry); if (IS_ERR(trans)) return PTR_ERR(trans); @@ -6994,9 +6992,6 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry, u64 root_objectid; int ret; - if (new_inode && S_ISDIR(new_dentry->d_inode->i_mode)) - dentry_unhash(new_dentry); - if (new_dir->i_ino == BTRFS_EMPTY_SUBVOL_DIR_OBJECTID) return -EPERM;