mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-27 23:02:30 -04:00
bcachefs: Fix an assertion
We can end up in a strange situation where a btree_path points to a node being freed even after pointers to it should have been replaced by pointers to the new node - if the btree node has been reused since the pointer to it was created. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
This commit is contained in:
committed by
Kent Overstreet
parent
42d237320e
commit
71ed0056dc
@@ -165,7 +165,8 @@ static void bch2_btree_node_free_inmem(struct btree_trans *trans,
|
||||
struct btree_path *path;
|
||||
|
||||
trans_for_each_path(trans, path)
|
||||
BUG_ON(path->l[b->c.level].b == b);
|
||||
BUG_ON(path->l[b->c.level].b == b &&
|
||||
path->l[b->c.level].lock_seq == b->c.lock.state.seq);
|
||||
|
||||
six_lock_write(&b->c.lock, NULL, NULL);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user