bcachefs: Fix ec repair code check
authorKent Overstreet <kent.overstreet@linux.dev>
Sun, 19 Feb 2023 05:43:10 +0000 (00:43 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:54 +0000 (17:09 -0400)
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/btree_gc.c

index 959f4081b42f2eeb1db5e16b459058133aef2655..8ae838acd8530d0024d786cf87f36d79d959d3e1 100644 (file)
@@ -661,7 +661,7 @@ static int bch2_check_fix_ptrs(struct btree_trans *trans, enum btree_id btree_id
                                         bch2_bkey_val_to_text(&buf, c, *k), buf.buf)))
                                do_update = true;
 
-                       if (fsck_err_on(!bch2_ptr_matches_stripe_m(m, p), c,
+                       if (fsck_err_on(m && m->alive && !bch2_ptr_matches_stripe_m(m, p), c,
                                        "pointer does not match stripe %llu\n"
                                        "while marking %s",
                                        (u64) p.ec.idx,