From a64a37338d49a79647d332f1f510daafffeab4ad Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Wed, 3 Jan 2024 20:34:46 -0500 Subject: [PATCH] bcachefs: Don't autofix errors we can't fix Signed-off-by: Kent Overstreet --- fs/bcachefs/error.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/bcachefs/error.c b/fs/bcachefs/error.c index e8200cad3ab80..d32c8bebe46c3 100644 --- a/fs/bcachefs/error.c +++ b/fs/bcachefs/error.c @@ -179,7 +179,8 @@ int bch2_fsck_err(struct bch_fs *c, struct printbuf buf = PRINTBUF, *out = &buf; int ret = -BCH_ERR_fsck_ignore; - if (test_bit(err, c->sb.errors_silent)) + if ((flags & FSCK_CAN_FIX) && + test_bit(err, c->sb.errors_silent)) return -BCH_ERR_fsck_fix; bch2_sb_error_count(c, err); -- 2.30.2