Commit aa6e130e authored by Kent Overstreet's avatar Kent Overstreet
Browse files

bcachefs: Add an assertion for trying to evict btree root

parent 4bd02d3f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1134,6 +1134,8 @@ void bch2_btree_node_evict(struct btree_trans *trans, const struct bkey_i *k)
	b = btree_cache_find(bc, k);
	if (!b)
		return;

	BUG_ON(b == btree_node_root(trans->c, b));
wait_on_io:
	/* not allowed to wait on io with btree locks held: */