mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] fs: grow_dev_page() failure path not a BUG()
@ 2011-10-20 22:05 Louis Huemiller
  0 siblings, 0 replies; only message in thread
From: Louis Huemiller @ 2011-10-20 22:05 UTC (permalink / raw)
  To: Alexander Viro; +Cc: linux-fsdevel, linux-kernel, Louis Huemiller

The function grow_dev_page() contains a label named failed which
is jumped to on allocation failure.  When the system is low on
memory, which is not a bug, this path can be taken.  This patch
removes the BUG() call, so that this path can be exercised for
proper operation on a debug kernel, without panicing the system.

Signed-off-by: Louis Huemiller <lhuemill@google.com>
---
 fs/buffer.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/fs/buffer.c b/fs/buffer.c
index 1a80b04..04781e6 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -1032,7 +1032,6 @@ grow_dev_page(struct block_device *bdev, sector_t block,
 	return page;
 
 failed:
-	BUG();
 	unlock_page(page);
 	page_cache_release(page);
 	return NULL;
-- 
1.7.3.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-10-20 22:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-20 22:05 [PATCH] fs: grow_dev_page() failure path not a BUG() Louis Huemiller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®