summaryrefslogtreecommitdiff
path: root/inode-map.c
diff options
context:
space:
mode:
authorDimitri John Ledkov <xnox@ubuntu.com>2017-02-13 11:24:33 +0000
committerDimitri John Ledkov <xnox@ubuntu.com>2017-02-13 11:24:33 +0000
commit4305d024938113df5d73021a09eb2a991f54ca2f (patch)
treed9e7ecc9db14bcc1394607a9e6c644a8b93e9bea /inode-map.c
parente693f0e4ffb1776a05b78264ee3d93d5f07efede (diff)
New upstream release Closes: #849353, #817806, #854915, #845473
Diffstat (limited to 'inode-map.c')
-rw-r--r--inode-map.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/inode-map.c b/inode-map.c
index 9e4dcd3..9000e69 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);