Commit d36cdb04 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Fix __bch2_trans_get_iter()

We need to also set iter->uptodate to indicate it needs to be traversed.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent ceda1b9a
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment