Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753384AbYFCRAl (ORCPT ); Tue, 3 Jun 2008 13:00:41 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753200AbYFCRAL (ORCPT ); Tue, 3 Jun 2008 13:00:11 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:46372 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753036AbYFCRAJ (ORCPT ); Tue, 3 Jun 2008 13:00:09 -0400 Date: Tue, 3 Jun 2008 09:59:50 -0700 (PDT) From: Linus Torvalds To: Al Viro cc: Ian Kent , Miklos Szeredi , jesper@krogh.cc, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: Linux 2.6.26-rc4 In-Reply-To: <20080603164102.GB28946@ZenIV.linux.org.uk> Message-ID: References: <20080603095713.GR28946@ZenIV.linux.org.uk> <5440.195.41.66.226.1212487482.squirrel@mail.jabbernet.dk> <20080603104035.GT28946@ZenIV.linux.org.uk> <20080603105258.GV28946@ZenIV.linux.org.uk> <1212499623.3025.46.camel@raven.themaw.net> <1212509263.3025.66.camel@raven.themaw.net> <20080603164102.GB28946@ZenIV.linux.org.uk> User-Agent: Alpine 1.10 (LFD 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1193 Lines: 36 On Tue, 3 Jun 2008, Al Viro wrote: > > > > If the dentry is unhashed, it means that it _either_ > > > > - has already been deleted (rmdir'ed) or d_invalidate()'d. Right? > > > > I don't see why you should ever return the dentry in this case.. > > From my reading of that code looks like it's been rmdir'ed. And no, I > don't understand what the hell is that code trying to do. Hmm. Looking closer, I think that code is meant to handle the d_invalidate() that it did in autofs4_tree_busy(). However, that should never trigger for a directory entry that can be reached some other way, because that code has done a "dget()" on the dentry, and d_invalidate() does if (atomic_read(&dentry->d_count) > 1) { if (dentry->d_inode && S_ISDIR(dentry->d_inode->i_mode)) { ..unlock.. return -EBUSY; } } so I dunno. I still think the expire code shouldn't even use d_invalidate() at all, and just revalidate() at lookup. Linus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/