summaryrefslogtreecommitdiff
path: root/fs/btrfs/check-integrity.c
diff options
context:
space:
mode:
authorStefan Behrens <sbehrens@giantdisaster.de>2014-05-09 17:28:07 +0400
committerChris Mason <clm@fb.com>2014-06-10 04:20:21 +0400
commit98806b446db8f15e83b59d065dae62901138e5cb (patch)
tree54d9b9843f7731b435f384f29dccb42b9167f491 /fs/btrfs/check-integrity.c
parent61391d562229ed94899ed4b4973dc2f0c015292a (diff)
downloadlinux-98806b446db8f15e83b59d065dae62901138e5cb.tar.xz
btrfs: check_int: propagate out-of-memory error upwards
This issue was not causing any harm but IMO (and in the opinion of the static code checker) it is better to propagate this error status upwards. Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/check-integrity.c')
-rw-r--r--fs/btrfs/check-integrity.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/btrfs/check-integrity.c b/fs/btrfs/check-integrity.c
index 0e8388e72d8d..ce92ae30250f 100644
--- a/fs/btrfs/check-integrity.c
+++ b/fs/btrfs/check-integrity.c
@@ -1093,6 +1093,7 @@ leaf_item_out_of_bounce_error:
next_stack =
btrfsic_stack_frame_alloc();
if (NULL == next_stack) {
+ sf->error = -1;
btrfsic_release_block_ctx(
&sf->
next_block_ctx);
@@ -1190,8 +1191,10 @@ continue_with_current_node_stack_frame:
sf->next_block_ctx.datav[0];
next_stack = btrfsic_stack_frame_alloc();
- if (NULL == next_stack)
+ if (NULL == next_stack) {
+ sf->error = -1;
goto one_stack_frame_backwards;
+ }
next_stack->i = -1;
next_stack->block = sf->next_block;