summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/error.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-01-04 02:34:46 +0100
committerKent Overstreet <kent.overstreet@linux.dev>2024-01-06 05:24:20 +0100
commita64a37338d49a79647d332f1f510daafffeab4ad (patch)
tree41cb8fa8552f9753b1a413080952105ecf326bd0 /fs/bcachefs/error.c
parentbcachefs: add missing bch2_latency_acct() call (diff)
downloadlinux-a64a37338d49a79647d332f1f510daafffeab4ad.tar.xz
linux-a64a37338d49a79647d332f1f510daafffeab4ad.zip
bcachefs: Don't autofix errors we can't fix
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/error.c')
-rw-r--r--fs/bcachefs/error.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/bcachefs/error.c b/fs/bcachefs/error.c
index e8200cad3ab8..d32c8bebe46c 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);