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:
1669d8a
)
btrfs-progs: return -ENOMEM properly in btrfs_read_block_groups()
author
Eryu Guan
<guaneryu@gmail.com>
Mon, 19 Oct 2015 11:38:00 +0000
(19:38 +0800)
committer
David Sterba
<dsterba@suse.com>
Mon, 2 Nov 2015 08:35:03 +0000
(09:35 +0100)
Breaking from the while loop makes ret overwritten to zero, goto error
label directly and return -ENOMEM.
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
extent-tree.c
patch
|
blob
|
history
diff --git
a/extent-tree.c
b/extent-tree.c
index
0c8152a
..
97cf961
100644
(file)
--- a/
extent-tree.c
+++ b/
extent-tree.c
@@
-3255,7
+3255,7
@@
int btrfs_read_block_groups(struct btrfs_root *root)
cache = kzalloc(sizeof(*cache), GFP_NOFS);
if (!cache) {
ret = -ENOMEM;
-
break
;
+
goto error
;
}
read_extent_buffer(leaf, &cache->item,