From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nir Tzachar Subject: Re: a problem with dget Date: Wed, 26 Mar 2003 11:45:22 +0200 (IST) Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: References: <20030326092320.GB24147@vagabond> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: linux-fsdevel@vger.kernel.org Return-path: To: Jan Hudec In-Reply-To: <20030326092320.GB24147@vagabond> List-Id: linux-fsdevel.vger.kernel.org > Isn't that the little confusing semanticsof lookup that's biting you? > When ->lookup returns non-NULL, real_lookup (the caller) puts the dentry > passed to ->lookup. So if you fill it in, you must return NULL and *NOT* > the dentry you recieved! > > > the problem happens every time i try to do a dget an any dentry. > > Yes, because you need to hold a reference to do dget. > thanks, this was my problem exactly. anyway, who uses these semantics? which f/s needs to reallocate a dentry and discards the one supplied to it? and why? ======================================================================== nir.