]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: handle ENOMEM in btrfs_alloc_tree_block
authorOmar Sandoval <osandov@osandov.com>
Tue, 24 Feb 2015 10:47:04 +0000 (02:47 -0800)
committerChris Mason <clm@fb.com>
Sun, 26 Apr 2015 13:27:00 +0000 (06:27 -0700)
commitde5d5b74dd656a393930e58d3f99a967f7feee61
tree97cc477d3597187e4aa4e450ba74e06f7eda4f35
parent4ac605a74711ea4892887043adb35d29f4cde356
btrfs: handle ENOMEM in btrfs_alloc_tree_block

This is one of the first places to give out when memory is tight. Handle
it properly rather than with a BUG_ON.

Also fix the comment about the return value, which is an ERR_PTR, not
NULL, on error.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
Reviewed-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/extent-tree.c