From mboxrd@z Thu Jan 1 00:00:00 1970 From: Trond Myklebust Subject: Re: 2 questions concerning vfs_rmdir() (2.4.x and 2.5.x) Date: 23 Aug 2002 11:24:32 +0200 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: References: <200208221548.01237.trond.myklebust@fys.uio.no> <20020822150511.GB1666@ravel.coda.cs.cmu.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Alexander Viro , linux-fsdevel@vger.kernel.org Return-path: To: Jan Harkes In-Reply-To: <20020822150511.GB1666@ravel.coda.cs.cmu.edu> List-Id: linux-fsdevel.vger.kernel.org >>>>> " " == Jan Harkes writes: > Worst case scenario is that the underlying FS receives a new > lookup for the entry. Probably very useful when the dcache is > slightly out of sync. But severely fscked up if the dentry is a mountpoint. > The rmdir might have failed because the directory doesn't exist > in the filesystem, so rehashing the dentry would be wrong. Where's the big deal? Either the dentry wasn't hashed in the first place (in which case a simple test before you call d_unhash() can be used to tell you not to rehash) or you will in any case need to have code in lookup_revalidate() to cope with the alternative case "I've got a hashed dentry that doesn't exist in the filesystem and I didn't call rmdir()". Cheers, Trond