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>
This commit is contained in:
parent
ef45c6b9db
commit
b98ad87a03
1
ctree.c
1
ctree.c
|
@ -2243,6 +2243,7 @@ split:
|
||||||
|
|
||||||
|
|
||||||
buf = kmalloc(item_size, GFP_NOFS);
|
buf = kmalloc(item_size, GFP_NOFS);
|
||||||
|
BUG_ON(!buf);
|
||||||
read_extent_buffer(leaf, buf, btrfs_item_ptr_offset(leaf,
|
read_extent_buffer(leaf, buf, btrfs_item_ptr_offset(leaf,
|
||||||
path->slots[0]), item_size);
|
path->slots[0]), item_size);
|
||||||
slot = path->slots[0] + 1;
|
slot = path->slots[0] + 1;
|
||||||
|
|
Loading…
Reference in New Issue