bcachefs: Fix __bch2_trans_get_iter()
We need to also set iter->uptodate to indicate it needs to be traversed. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
ceda1b9a17
commit
d36cdb045a
@ -2085,15 +2085,16 @@ struct btree_iter *__bch2_trans_get_iter(struct btree_trans *trans,
|
||||
btree_iter_get_locks(iter, true, false);
|
||||
}
|
||||
|
||||
while (iter->level < depth) {
|
||||
while (iter->level != depth) {
|
||||
btree_node_unlock(iter, iter->level);
|
||||
iter->l[iter->level].b = BTREE_ITER_NO_NODE_INIT;
|
||||
iter->level++;
|
||||
iter->uptodate = BTREE_ITER_NEED_TRAVERSE;
|
||||
if (iter->level < depth)
|
||||
iter->level++;
|
||||
else
|
||||
iter->level--;
|
||||
}
|
||||
|
||||
while (iter->level > depth)
|
||||
iter->l[--iter->level].b = BTREE_ITER_NO_NODE_INIT;
|
||||
|
||||
iter->min_depth = depth;
|
||||
|
||||
bch2_btree_iter_set_pos(iter, pos);
|
||||
|
Loading…
x
Reference in New Issue
Block a user