From: Jan Blunck Subject: Re: [RFC] pdirops: vfs patch Date: Tue, 22 Feb 2005 14:41:58 +0100 Message-ID: <1109079718.421b36a621d16@webmail.tu-harburg.de> References: <1109073273.421b1d7923204@webmail.tu-harburg.de> <1109077222.421b2ce6739f8@webmail.tu-harburg.de> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT Cc: Alexander Viro , Linux-Kernel Mailing List , linux-fsdevel Received: from smtp2.rz.tu-harburg.de ([134.28.205.13]:9993 "EHLO smtp2.rz.tu-harburg.de") by vger.kernel.org with ESMTP id S262308AbVBVNmE (ORCPT ); Tue, 22 Feb 2005 08:42:04 -0500 To: Alex Tomas In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Quoting Alex Tomas : > >>>>> Jan Blunck (JB) writes: > > JB> i_sem does NOT protect the dcache. Also not in real_lookup(). The lock > must be > JB> acquired for ->lookup() and because we might sleep on i_sem, we have to > get it > JB> early and check for repopulation of the dcache. > > dentry is part of dcache, right? i_sem protects dentry from being > returned with incomplete data inside, right? > Nope, d_alloc() is setting d_flags to DCACHE_UNHASHED. Therefore it is not found by __d_lookup() until it is rehashed which is implicit done by ->lookup(). Jan