]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
bcachefs: Don't autofix errors we can't fix
authorKent Overstreet <kent.overstreet@linux.dev>
Thu, 4 Jan 2024 01:34:46 +0000 (20:34 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sat, 6 Jan 2024 04:24:20 +0000 (23:24 -0500)
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/error.c

index e8200cad3ab8097187a1a29b7854f9d523568e37..d32c8bebe46c32f7abc1a11ad49ee80752f2a623 100644 (file)
@@ -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);