提交 98806b44 编写于 作者: S Stefan Behrens 提交者: Chris Mason

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: NStefan Behrens <sbehrens@giantdisaster.de>
Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NChris Mason <clm@fb.com>
上级 61391d56
...@@ -1093,6 +1093,7 @@ static int btrfsic_process_metablock( ...@@ -1093,6 +1093,7 @@ static int btrfsic_process_metablock(
next_stack = next_stack =
btrfsic_stack_frame_alloc(); btrfsic_stack_frame_alloc();
if (NULL == next_stack) { if (NULL == next_stack) {
sf->error = -1;
btrfsic_release_block_ctx( btrfsic_release_block_ctx(
&sf-> &sf->
next_block_ctx); next_block_ctx);
...@@ -1190,8 +1191,10 @@ static int btrfsic_process_metablock( ...@@ -1190,8 +1191,10 @@ static int btrfsic_process_metablock(
sf->next_block_ctx.datav[0]; sf->next_block_ctx.datav[0];
next_stack = btrfsic_stack_frame_alloc(); next_stack = btrfsic_stack_frame_alloc();
if (NULL == next_stack) if (NULL == next_stack) {
sf->error = -1;
goto one_stack_frame_backwards; goto one_stack_frame_backwards;
}
next_stack->i = -1; next_stack->i = -1;
next_stack->block = sf->next_block; next_stack->block = sf->next_block;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册