From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marco Stornelli Subject: Re: get_inode callback of generic_fh_to_{dentry|parent} Date: Tue, 24 Aug 2010 08:46:12 +0200 Message-ID: References: <20100823141009.GA25185@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: linux-fsdevel@vger.kernel.org To: Christoph Hellwig Return-path: Received: from mail-qy0-f174.google.com ([209.85.216.174]:63892 "EHLO mail-qy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752053Ab0HXGqN convert rfc822-to-8bit (ORCPT ); Tue, 24 Aug 2010 02:46:13 -0400 Received: by qyk9 with SMTP id 9so3415212qyk.19 for ; Mon, 23 Aug 2010 23:46:12 -0700 (PDT) In-Reply-To: <20100823141009.GA25185@infradead.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 2010/8/23 Christoph Hellwig : > 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 th= e >> 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 th= e >> callback like this: >> >> =A0 /* 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, ev= en > if it's not in the inode cache. > > Ok, right. However, it's not necessary to allocate it if it's not yet allocated, it just needs to check if the inode is allocated and return it, if I well understand. -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html