Commit a7431348 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Fix check_pos_snapshot_overwritten for !snapshots

It shouldn't run if the btree being checked doesn't have snapshots.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
parent 21aec962
......@@ -1088,6 +1088,9 @@ static int check_pos_snapshot_overwritten(struct btree_trans *trans,
struct bkey_s_c k;
int ret;
if (!btree_type_has_snapshots(id))
return 0;
if (!snapshot_t(c, pos.snapshot)->children[0])
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment