summaryrefslogtreecommitdiff
path: root/fs/bcachefs/alloc_background.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2025-05-28 11:31:51 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2025-05-31 22:03:16 -0400
commit642c1aabb001ee8410e6bfb6654b23bcead64e4e (patch)
treed78f7fac442e85b3cd4e46e3d95dce84e0cd0c41 /fs/bcachefs/alloc_background.c
parentdc43f6a70b9685acabfda210f7cbb0520e952510 (diff)
downloadlinux-next-642c1aabb001ee8410e6bfb6654b23bcead64e4e.tar.gz
linux-next-642c1aabb001ee8410e6bfb6654b23bcead64e4e.zip
bcachefs: Use bch2_err_matches() for BCH_ERR_fsck_(fix|ignore)
We'll be adding subtypes of these errors, and new error code tracing. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/alloc_background.c')
-rw-r--r--fs/bcachefs/alloc_background.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/alloc_background.c b/fs/bcachefs/alloc_background.c
index 271d4a2eb15f..f284b4a2b535 100644
--- a/fs/bcachefs/alloc_background.c
+++ b/fs/bcachefs/alloc_background.c
@@ -709,8 +709,8 @@ static int __need_discard_or_freespace_err(struct btree_trans *trans,
set ? "" : "un",
bch2_btree_id_str(btree),
buf.buf);
- if (ret == -BCH_ERR_fsck_ignore ||
- ret == -BCH_ERR_fsck_errors_not_fixed)
+ if (bch2_err_matches(ret, BCH_ERR_fsck_ignore) ||
+ bch2_err_matches(ret, BCH_ERR_fsck_errors_not_fixed))
ret = 0;
printbuf_exit(&buf);