diff mbox series

[v2,03/12] btrfs-progs: propagate fs root errors in lowmem mode

Message ID 8a8235462677d3a7c1cf21a8bd3244d929f1466e.1629322156.git.josef@toxicpanda.com (mailing list archive)
State New, archived
Headers show
Series btrfs-progs: make check handle invalid bg items | expand

Commit Message

Josef Bacik Aug. 18, 2021, 9:33 p.m. UTC
We have a check that will return an error only if ret < 0, but we return
the lowmem specific errors which are all > 0.  Fix this by simply
checking if (ret).  This allows test 010 to pass with lowmem properly.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
---
 check/mode-lowmem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Qu Wenruo Aug. 19, 2021, 5:43 a.m. UTC | #1
On 2021/8/19 上午5:33, Josef Bacik wrote:
> We have a check that will return an error only if ret < 0, but we return
> the lowmem specific errors which are all > 0.  Fix this by simply
> checking if (ret).  This allows test 010 to pass with lowmem properly.
>
> Signed-off-by: Josef Bacik <josef@toxicpanda.com>

Reviewed-by: Qu Wenruo <wqu@suse.com>

Thanks,
Qu
> ---
>   check/mode-lowmem.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/check/mode-lowmem.c b/check/mode-lowmem.c
> index 7fc7d467..d278c927 100644
> --- a/check/mode-lowmem.c
> +++ b/check/mode-lowmem.c
> @@ -5204,7 +5204,7 @@ static int check_btrfs_root(struct btrfs_root *root, int check_all)
>   		 * missing we will skip it forever.
>   		 */
>   		ret = check_fs_first_inode(root);
> -		if (ret < 0)
> +		if (ret)
>   			return FATAL_ERROR;
>   	}
>
>
diff mbox series

Patch

diff --git a/check/mode-lowmem.c b/check/mode-lowmem.c
index 7fc7d467..d278c927 100644
--- a/check/mode-lowmem.c
+++ b/check/mode-lowmem.c
@@ -5204,7 +5204,7 @@  static int check_btrfs_root(struct btrfs_root *root, int check_all)
 		 * missing we will skip it forever.
 		 */
 		ret = check_fs_first_inode(root);
-		if (ret < 0)
+		if (ret)
 			return FATAL_ERROR;
 	}