From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Howells Subject: Re: [PATCH 12/30] IGET: Stop EXT3 from using iget() and read_inode() Date: Tue, 02 Oct 2007 14:16:59 +0100 Message-ID: <24599.1191331019@redhat.com> References: <20071002102401.GB25647@atrey.karlin.mff.cuni.cz> <20071001130921.29339.72876.stgit@warthog.procyon.org.uk> <20071001131023.29339.51838.stgit@warthog.procyon.org.uk> Cc: dhowells@redhat.com, hch@infradead.org, viro@ftp.linux.org.uk, torvalds@osdl.org, akpm@osdl.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org To: Jan Kara Return-path: Received: from mx1.redhat.com ([66.187.233.31]:51138 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752474AbXJBNRg (ORCPT ); Tue, 2 Oct 2007 09:17:36 -0400 In-Reply-To: <20071002102401.GB25647@atrey.karlin.mff.cuni.cz> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Jan Kara wrote: > But if you 'goto out' in some branches, we loose the ext3_warning() > which we probably don't want. Ugh. Okay, I need to rework the changes to that function. > > return ERR_PTR(-EACCES); > Wouldn't here -EIO be more appropriate? I would have thought so, but -EACCES was what it returned before I touched it. OTOH, it's calling ext3_error(), so EIO ought to be the right thing to do. I'll alter it and see if anyone complains. > Why don't we use PTR_ERR() always? Is there some reason not to return > -EIO? I do wonder why it used to return EINVAL rather than EIO. It's understandable if the magic number doesn't match, but if it appears to be an otherwise corrupt filesystem, then yes, I guess it should return EIO. I'll change it. David