From b98ad87a037c053da533d7d9929583b9ea42c86c Mon Sep 17 00:00:00 2001 From: David Sterba Date: Wed, 6 Jan 2016 15:52:11 +0100 Subject: [PATCH] btrfs-progs: catch memory allocation failure in btrfs_split_item Do the dumb BUG_ON now, the function needs more changes to handle all errors. Signed-off-by: David Sterba --- ctree.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ctree.c b/ctree.c index 46153e3..04cc476 100644 --- a/ctree.c +++ b/ctree.c @@ -2243,6 +2243,7 @@ split: buf = kmalloc(item_size, GFP_NOFS); + BUG_ON(!buf); read_extent_buffer(leaf, buf, btrfs_item_ptr_offset(leaf, path->slots[0]), item_size); slot = path->slots[0] + 1; -- 2.7.4