From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH 07/30] IGET: Stop BEFS from using iget() and read_inode() Date: Mon, 1 Oct 2007 19:06:02 +0100 Message-ID: <20071001180601.GA9417@infradead.org> References: <20071001130921.29339.72876.stgit@warthog.procyon.org.uk> <20071001130958.29339.31669.stgit@warthog.procyon.org.uk> <20071001173930.GA7718@mami.zabbo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Zach Brown , David Howells , hch@infradead.org, viro@ftp.linux.org.uk, akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org To: Linus Torvalds Return-path: Received: from pentafluge.infradead.org ([213.146.154.40]:40992 "EHLO pentafluge.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754818AbXJASGI (ORCPT ); Mon, 1 Oct 2007 14:06:08 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Mon, Oct 01, 2007 at 10:44:59AM -0700, Linus Torvalds wrote: > > If you're soliciting opinions, I think I tend to prefer the feel of the > > code paths after the changes. I don't know the benefits of the change > > are worth the risk in unmaintained file systems, though. > > > > > + return ERR_PTR(PTR_ERR(inode)); > > > > This caught my eye. Surely we can do better :). It seems to happen a > > few times in the patches, the instance in this patch was the first that > > I noticed. > > Yeah. The above obviously *should* be the same as > > return inode; > > apart from a few casts. But if the casts matter, there's something else > wrong. befs_lookup, which the above gem is from, returns a dentry *. And given either return (dentry *)inode; or return ERR_PTR(PTR_ERR(inode)); I tend to prefer the latter.