From: Josef Bacik Date: Fri, 5 Oct 2012 20:43:45 +0000 (-0400) Subject: Btrfs: do not warn_on when we cannot alloc a page for an extent buffer X-Git-Tag: firefly_0821_release~3680^2~1721^2~15 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4804b38293c020e7a2c841e86402f456c19d934d;p=firefly-linux-kernel-4.4.55.git Btrfs: do not warn_on when we cannot alloc a page for an extent buffer It's just annoying and the user will have gotten a nice OOM killer message so they are already fully aware they are screwed :). Thanks, Reported-by: Jérôme Poulin Signed-off-by: Josef Bacik --- diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 8c37cb64be7a..7dc69b38548d 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -4249,10 +4249,8 @@ struct extent_buffer *alloc_extent_buffer(struct extent_io_tree *tree, for (i = 0; i < num_pages; i++, index++) { p = find_or_create_page(mapping, index, GFP_NOFS); - if (!p) { - WARN_ON(1); + if (!p) goto free_eb; - } spin_lock(&mapping->private_lock); if (PagePrivate(p)) {