mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-06 13:23:18 +00:00
bcachefs: maintain lock invariants in btree_iter_next_node()
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
449ceafb49
commit
f2d9823f46
@ -1902,6 +1902,9 @@ struct btree *bch2_btree_iter_next_node(struct btree_iter *iter)
|
||||
if (bpos_eq(iter->pos, b->key.k.p)) {
|
||||
__btree_path_set_level_up(trans, path, path->level++);
|
||||
} else {
|
||||
if (btree_lock_want(path, path->level + 1) == BTREE_NODE_UNLOCKED)
|
||||
btree_node_unlock(trans, path, path->level + 1);
|
||||
|
||||
/*
|
||||
* Haven't gotten to the end of the parent node: go back down to
|
||||
* the next child node
|
||||
|
Loading…
Reference in New Issue
Block a user