diff options
author | David Sterba <dsterba@suse.com> | 2016-08-31 20:38:46 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-09-21 14:12:38 +0200 |
commit | 1ef93ea8632b89598d7723a04a2d268b70333168 (patch) | |
tree | 48e911e91131e2023534ae8dbd652d245a039f15 /extent-tree.c | |
parent | b318553f33dc59b6afdc7d264dcfbfe835ccc3d4 (diff) |
btrfs-progs: handle errors from btrfs_alloc_path
All functions already return an error condition, so the callers should
expect that.
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'extent-tree.c')
-rw-r--r-- | extent-tree.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/extent-tree.c b/extent-tree.c index 0607be66..fb627940 100644 --- a/extent-tree.c +++ b/extent-tree.c @@ -2714,7 +2714,8 @@ static int alloc_reserved_tree_block(struct btrfs_trans_handle *trans, size += sizeof(*block_info); path = btrfs_alloc_path(); - BUG_ON(!path); + if (!path) + return -ENOMEM; ret = btrfs_insert_empty_item(trans, fs_info->extent_root, path, ins, size); |