From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joel Becker Subject: Re: [PATCH 16/18] ocfs2: remove unnecessary dentry_unhash on rmdir/rename_dir Date: Tue, 10 May 2011 13:24:21 -0700 Message-ID: <20110510202420.GA29657@noexit.corp.google.com> References: <1305002616-16782-1-git-send-email-sage@newdream.net> <1305002616-16782-17-git-send-email-sage@newdream.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: viro@ZenIV.linux.org.uk, hch@lst.de, linux-fsdevel@vger.kernel.org, Mark Fasheh , ocfs2-devel@oss.oracle.com To: Sage Weil Return-path: Received: from zeniv.linux.org.uk ([195.92.253.2]:56828 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750950Ab1EJUY2 (ORCPT ); Tue, 10 May 2011 16:24:28 -0400 Content-Disposition: inline In-Reply-To: <1305002616-16782-17-git-send-email-sage@newdream.net> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, May 09, 2011 at 09:43:34PM -0700, Sage Weil wrote: > Ocfs2 has no issues with lingering references to unlinked directory inodes. > > CC: Mark Fasheh > CC: Joel Becker > CC: ocfs2-devel@oss.oracle.com > Signed-off-by: Sage Weil > --- > fs/ocfs2/namei.c | 6 ------ > 1 files changed, 0 insertions(+), 6 deletions(-) > > diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c > index f3582a6..e5d738c 100644 > --- a/fs/ocfs2/namei.c > +++ b/fs/ocfs2/namei.c > @@ -810,9 +810,6 @@ static int ocfs2_unlink(struct inode *dir, > (unsigned long long)OCFS2_I(dir)->ip_blkno, > (unsigned long long)OCFS2_I(inode)->ip_blkno); > > - if (S_ISDIR(inode->i_mode)) > - dentry_unhash(dentry); > - I'm wary about this. If ocfs2_unlink/ocfs2_rename fail, d_delete is not called. Also, d_delete doesn't always clear it. I worry that we'll have a dentry that can be traversed even though its state in the cluster is bad or unknown. However, I think our d_revalidate checks should correctly catch these cases. If we get to the point of doing actual work, we've assuredly told other nodes to forget about this directory. So I'll tentatively Ack this, and hope it doesn't explode ;-) Acked-by: Joel Becker -- "I inject pure kryptonite into my brain. It improves my kung fu, and it eases the pain." http://www.jlbec.org/ jlbec@evilplan.org