From: Kent Overstreet Date: Sun, 19 Feb 2023 05:43:10 +0000 (-0500) Subject: bcachefs: Fix ec repair code check X-Git-Tag: io_uring-6.7-2023-11-10~119^2~489 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=7546c78df1963c60b2b6b80265daa26462b87ec5;p=linux-block.git bcachefs: Fix ec repair code check Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/btree_gc.c b/fs/bcachefs/btree_gc.c index 959f4081b42f..8ae838acd853 100644 --- a/fs/bcachefs/btree_gc.c +++ b/fs/bcachefs/btree_gc.c @@ -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,