Skip to content

Commit 359571c

Browse files
author
Kent Overstreet
committed
bcachefs: Fix check_topology() when using node scan
shoot down journal keys _before_ populating journal keys with pointers to scanned nodes Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
1 parent 9c43240 commit 359571c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/bcachefs/btree_gc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,12 +544,12 @@ int bch2_check_topology(struct bch_fs *c)
544544
bch2_btree_root_alloc_fake(c, i, 0);
545545
} else {
546546
bch2_btree_root_alloc_fake(c, i, 1);
547+
bch2_shoot_down_journal_keys(c, i, 1, BTREE_MAX_DEPTH, POS_MIN, SPOS_MAX);
547548
ret = bch2_get_scanned_nodes(c, i, 0, POS_MIN, SPOS_MAX);
548549
if (ret)
549550
break;
550551
}
551552

552-
bch2_shoot_down_journal_keys(c, i, 1, BTREE_MAX_DEPTH, POS_MIN, SPOS_MAX);
553553
reconstructed_root = true;
554554
}
555555

0 commit comments

Comments
 (0)