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 /inode-map.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 'inode-map.c')
-rw-r--r-- | inode-map.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/inode-map.c b/inode-map.c index 9e4dcd3c..9000e69b 100644 --- a/inode-map.c +++ b/inode-map.c @@ -39,7 +39,9 @@ int btrfs_find_free_objectid(struct btrfs_trans_handle *trans, u64 search_start = dirid; path = btrfs_alloc_path(); - BUG_ON(!path); + if (!path) + return -ENOMEM; + search_start = root->last_inode_alloc; search_start = max((unsigned long long)search_start, BTRFS_FIRST_FREE_OBJECTID); |