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 <dsterba@suse.com>
master
David Sterba 2016-01-06 15:52:11 +01:00
parent ef45c6b9db
commit b98ad87a03
1 changed files with 1 additions and 0 deletions

View File

@ -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;