From: Theodore Ts'o <tytso@mit.edu>
To: Lukas Czerner <lczerner@redhat.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH] ext4: fix error handling in ext4_fill_super()
Date: Thu, 8 Nov 2012 15:15:56 -0500 [thread overview]
Message-ID: <20121108201556.GM19977@thunk.org> (raw)
In-Reply-To: <1349699574-32194-1-git-send-email-lczerner@redhat.com>
On Mon, Oct 08, 2012 at 02:32:54PM +0200, Lukas Czerner wrote:
> There are some places in ext4_fill_super() where we would not return
> proper error code if something fails. The confusion is caused probably
> due to the fact that we have two "kind-of" return variables 'ret'and
> 'err'.
>
> 'ret' is used to return error code from ext4_fill_super() where err is
> used to store return values from other functions within ext4_fill_super().
> However some places were missing the obligatory 'ret = err'. We could
> put the assignment where it is missing, but we can have better "future
> proof" solution. Or we could convert the code to use just one, but it
> would require more rewrites.
>
> This commit fixes the problem by returning value from 'err' variable if
> it is set and 'ret' otherwise in error handling branch of the
> ext4_fill_super(). The reasoning is that 'ret' value is often set to
> default "-EINVAL" or explicit value, where 'err' is used to store
> return value from other functions and should be otherwise zero.
>
> Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Applied, thanks.
- Ted
prev parent reply other threads:[~2012-11-08 22:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-08 11:09 [PATCH] ext4: fix error handling in ext4_fill_super() Eugene Shatokhin
2012-10-08 12:25 ` Lukáš Czerner
2012-10-08 12:32 ` Lukas Czerner
2012-10-08 13:48 ` Lukáš Czerner
2012-10-08 14:46 ` Eugene Shatokhin
2012-11-08 20:15 ` Theodore Ts'o [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121108201556.GM19977@thunk.org \
--to=tytso@mit.edu \
--cc=lczerner@redhat.com \
--cc=linux-ext4@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).