From patchwork Fri May 27 20:41:56 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sage Weil X-Patchwork-Id: 97750 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (173-166-109-252-newengland.hfc.comcastbusiness.net [173.166.109.252]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id DE333B6F86 for ; Sat, 28 May 2011 06:51:07 +1000 (EST) Received: from canuck.infradead.org ([2001:4978:20e::1]) by bombadil.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QQ3r5-00073W-76; Fri, 27 May 2011 20:41:59 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QQ3r2-0007CE-Mx; Fri, 27 May 2011 20:41:56 +0000 Received: from cobra.newdream.net ([66.33.216.30]) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QQ3qz-0007BL-RX for linux-mtd@lists.infradead.org; Fri, 27 May 2011 20:41:54 +0000 Received: from localhost.localdomain (ip-66-33-206-8.dreamhost.com [66.33.206.8]) by cobra.newdream.net (Postfix) with ESMTPA id 2813EBC92D; Fri, 27 May 2011 13:43:19 -0700 (PDT) From: Sage Weil To: hch@infradead.org, viro@ZenIV.linux.org.uk Subject: [PATCH 03/26] jffs2: remove unnecessary dentry_unhash from rmdir, dir rename Date: Fri, 27 May 2011 13:41:56 -0700 Message-Id: <1306528939-30636-4-git-send-email-sage@newdream.net> X-Mailer: git-send-email 1.7.0 In-Reply-To: <1306528939-30636-1-git-send-email-sage@newdream.net> References: <1306528939-30636-1-git-send-email-sage@newdream.net> X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110527_164154_036293_45836D7C X-CRM114-Status: GOOD ( 10.03 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain Cc: linux-fsdevel@vger.kernel.org, Sage Weil , David Woodhouse , linux-mtd@lists.infradead.org X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org jffs2 does not have problems with references to unlinked directories. CC: David Woodhouse CC: linux-mtd@lists.infradead.org Signed-off-by: Sage Weil --- fs/jffs2/dir.c | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/fs/jffs2/dir.c b/fs/jffs2/dir.c index 05f7332..82faddd 100644 --- a/fs/jffs2/dir.c +++ b/fs/jffs2/dir.c @@ -609,8 +609,6 @@ static int jffs2_rmdir (struct inode *dir_i, struct dentry *dentry) int ret; uint32_t now = get_seconds(); - dentry_unhash(dentry); - for (fd = f->dents ; fd; fd = fd->next) { if (fd->ino) return -ENOTEMPTY; @@ -786,9 +784,6 @@ static int jffs2_rename (struct inode *old_dir_i, struct dentry *old_dentry, uint8_t type; uint32_t now; - if (new_dentry->d_inode && S_ISDIR(new_dentry->d_inode->i_mode)) - dentry_unhash(new_dentry); - /* The VFS will check for us and prevent trying to rename a * file over a directory and vice versa, but if it's a directory, * the VFS can't check whether the victim is empty. The filesystem