diff mbox series

[v3,3/9] btrfs-progs: check: propagate fs root errors in lowmem mode

Message ID 4f0610522b39fb4f5e3b91f9a2302d68fda8b062.1629746415.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. 23, 2021, 7:23 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.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
---
 check/mode-lowmem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/check/mode-lowmem.c b/check/mode-lowmem.c
index 888894e8..507873ce 100644
--- a/check/mode-lowmem.c
+++ b/check/mode-lowmem.c
@@ -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;
 	}