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: check, fix false error reports for shared prealloc extents
[platform/upstream/btrfs-progs.git]
/
inode-map.c
diff --git
a/inode-map.c
b/inode-map.c
index
346952b
..
9000e69
100644
(file)
--- a/
inode-map.c
+++ b/
inode-map.c
@@
-19,6
+19,7
@@
#include "ctree.h"
#include "disk-io.h"
#include "transaction.h"
#include "ctree.h"
#include "disk-io.h"
#include "transaction.h"
+#include "internal.h"
/*
* walks the btree of allocated inodes and find a hole.
/*
* walks the btree of allocated inodes and find a hole.
@@
-38,7
+39,9
@@
int btrfs_find_free_objectid(struct btrfs_trans_handle *trans,
u64 search_start = dirid;
path = btrfs_alloc_path();
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);
search_start = root->last_inode_alloc;
search_start = max((unsigned long long)search_start,
BTRFS_FIRST_FREE_OBJECTID);