From eebe8a8459f78bbac5a12d0ef76838929d736ad2 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Sat, 23 Sep 2023 16:55:03 -0400 Subject: bcachefs: Make sure to initialize equiv when creating new snapshots Previously, equiv was set in the snapshot deletion path, which is where it's needed - equiv, for snapshot ID equivalence classes, would ideally be a private data structure to the snapshot deletion path. But if a new snapshot is created while snapshot deletion is running, move_key_to_correct_snapshot() moves a key to snapshot id 0 - oops. Fixes: https://github.com/koverstreet/bcachefs/issues/593 Signed-off-by: Kent Overstreet --- fs/bcachefs/snapshot.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'fs/bcachefs/snapshot.h') diff --git a/fs/bcachefs/snapshot.h b/fs/bcachefs/snapshot.h index dabc9b9d921b..de215d9d1252 100644 --- a/fs/bcachefs/snapshot.h +++ b/fs/bcachefs/snapshot.h @@ -235,8 +235,6 @@ int bch2_snapshot_lookup(struct btree_trans *trans, u32 id, struct bch_snapshot *s); int bch2_snapshot_get_subvol(struct btree_trans *, u32, struct bch_subvolume *); -int bch2_snapshot_live(struct btree_trans *trans, u32 id); -int bch2_snapshot_set_equiv(struct btree_trans *trans, struct bkey_s_c k); /* only exported for tests: */ int bch2_snapshot_node_create(struct btree_trans *, u32, -- cgit v1.2.3