From: Nick Piggin <npiggin@suse.de>
To: tytso@mit.edu, Marcin Slusarz <marcin.slusarz@gmail.com>,
Amerigo Wang <amwang@redhat.com>,
linux-kernel@vger.kernel.org,
Alexander Viro <viro@zeniv.linux.org.uk>,
Jens Axboe <jens.ax
Subject: Re: [Patch] fs: remove a useless BUG()
Date: Wed, 2 Dec 2009 09:52:23 +0100 [thread overview]
Message-ID: <20091202085223.GD21967@wotan.suse.de> (raw)
In-Reply-To: <20091201185225.GB6278@thunk.org>
On Tue, Dec 01, 2009 at 01:52:25PM -0500, tytso@mit.edu wrote:
> On Tue, Dec 01, 2009 at 05:55:11PM +0100, Marcin Slusarz wrote:
> > On Mon, Nov 30, 2009 at 09:34:14PM -0500, Amerigo Wang wrote:
> > > This BUG() is suspicious, it makes its following statements
> > > unreachable,
> > only when CONFIG_BUG=y
>
> Which is true for all kernels except for the very rare embedded case.
>
> > > and it seems to be useless, since the caller
> > > of this function already handles the failure properly.
> > because this function can return NULL in other codepath
> >
> > > Remove it.
> > I don't know why this BUG() is there (and maybe it's not really
> > needed), but your rationale is wrong.
>
> Your reply is a bit snarky, IMHO. It might have been nicer and more
> courteous if you had bothered to take a closer look at the patch
> before firing off a reply.
>
> In fact, it's good to avoid BUG() if at all possible, especially if it
> can happen in the normally course of events --- such as running out of
> memory. Having code which triggers an BUG in an low memory situation
> is very bad form.
>
> Looks good to me.
>
> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Maybe convert it to a warning?
next prev parent reply other threads:[~2009-12-02 8:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-01 2:34 [Patch] fs: remove a useless BUG() Amerigo Wang
2009-12-01 16:55 ` Marcin Slusarz
2009-12-01 18:52 ` tytso
2009-12-02 8:52 ` Nick Piggin [this message]
2009-12-02 22:14 ` Andrew Morton
2009-12-08 10:13 ` Cong Wang
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=20091202085223.GD21967@wotan.suse.de \
--to=npiggin@suse.de \
--cc=amwang@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marcin.slusarz@gmail.com \
--cc=tytso@mit.edu \
--cc=viro@zeniv.linux.org.uk \
/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).