linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Patch] fs: remove a useless BUG()
@ 2009-12-01  2:34 Amerigo Wang
  2009-12-01 16:55 ` Marcin Slusarz
  2009-12-02 22:14 ` Andrew Morton
  0 siblings, 2 replies; 6+ messages in thread
From: Amerigo Wang @ 2009-12-01  2:34 UTC (permalink / raw)
  To: linux-kernel
  Cc: Alexander Viro, Jens Axboe, Nick Piggin, Amerigo Wang,
	linux-fsdevel, akpm, Theodore Ts'o


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;

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-12-08 10:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2009-12-02 22:14 ` Andrew Morton
2009-12-08 10:13   ` Cong Wang

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).