btrfs-progs: propagate fs root errors in lowmem mode

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.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Josef Bacik 2021-08-18 17:33:15 -04:00 committed by David Sterba
parent 28df4bbd74
commit 477775946d

View File

@ -5195,7 +5195,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;
}