From: Amerigo Wang <amwang@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
Jens Axboe <jens.axboe@oracle.com>, Nick Piggin <npiggin@suse.de>,
Amerigo Wang <amwang@redhat.com>,
linux-fsdevel@vger.kernel.org, akpm@linux-foundation.org,
"Theodore Ts'o" <tytso@mit.edu>
Subject: [Patch] fs: remove a useless BUG()
Date: Mon, 30 Nov 2009 21:34:14 -0500 [thread overview]
Message-ID: <20091201023714.3863.92566.sendpatchset@localhost.localdomain> (raw)
This BUG() is suspicious, it makes its following statements
unreachable, and it seems to be useless, since the caller
of this function already handles the failure properly.
Remove it.
Signed-off-by: WANG Cong <amwang@redhat.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Nick Piggin <npiggin@suse.de>
Cc: "Theodore Ts'o" <tytso@mit.edu>
---
diff --git a/fs/buffer.c b/fs/buffer.c
index 6fa5302..ac111d7 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -1041,7 +1041,6 @@ grow_dev_page(struct block_device *bdev, sector_t block,
return page;
failed:
- BUG();
unlock_page(page);
page_cache_release(page);
return NULL;
next reply other threads:[~2009-12-01 2:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-01 2:34 Amerigo Wang [this message]
2009-12-01 16:55 ` [Patch] fs: remove a useless BUG() Marcin Slusarz
2009-12-01 18:52 ` tytso
2009-12-02 8:52 ` Nick Piggin
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=20091201023714.3863.92566.sendpatchset@localhost.localdomain \
--to=amwang@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=jens.axboe@oracle.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=npiggin@suse.de \
--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