From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: get_inode callback of generic_fh_to_{dentry|parent} Date: Mon, 23 Aug 2010 10:10:09 -0400 Message-ID: <20100823141009.GA25185@infradead.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org To: Marco Stornelli Return-path: Received: from bombadil.infradead.org ([18.85.46.34]:45065 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753089Ab0HWOKJ (ORCPT ); Mon, 23 Aug 2010 10:10:09 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, Aug 23, 2010 at 03:32:04PM +0200, Marco Stornelli wrote: > Hi, > > I'm the maintainer of pramfs. I'm currently working in the export > operation for my fs and I've got a question about the callback in the > subject. Is it right that this function return an error for a not > allocated inode? I see a comment for example in the ext2 code for the > callback like this: > > /* iget isn't really right if the inode is currently unallocated!! */ > > So I think it's cleaner to use ilookup() instead of iget(). Comments? ilookup only returns an inode if it's already in the inode cache. the get_inode callback needs to return an inode if it's allocated, even if it's not in the inode cache.