projects
/
platform
/
upstream
/
btrfs-progs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
28fdd0d
)
btrfs-progs: check: improved error handling in calc_extent_flag
author
David Sterba
<dsterba@suse.com>
Tue, 6 Sep 2016 11:08:29 +0000
(13:08 +0200)
committer
David Sterba
<dsterba@suse.com>
Wed, 21 Sep 2016 12:12:38 +0000
(14:12 +0200)
All callers handle errors.
Signed-off-by: David Sterba <dsterba@suse.com>
cmds-check.c
patch
|
blob
|
history
diff --git
a/cmds-check.c
b/cmds-check.c
index
df97d3b
..
aff3c03
100644
(file)
--- a/
cmds-check.c
+++ b/
cmds-check.c
@@
-6047,7
+6047,9
@@
static int calc_extent_flag(struct btrfs_root *root,
cache = lookup_cache_extent(extent_cache, buf->start, 1);
/* we have added this extent before */
- BUG_ON(!cache);
+ if (!cache)
+ return -ENOENT;
+
rec = container_of(cache, struct extent_record, cache);
/*