projects
/
platform
/
upstream
/
btrfs-progs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
btrfs-progs: tests: Add test case with valid orphan inode
[platform/upstream/btrfs-progs.git]
/
inode-map.c
diff --git
a/inode-map.c
b/inode-map.c
index
9e4dcd3
..
9000e69
100644
(file)
--- 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);