mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-09 15:29:16 +00:00
bcachefs: Save key_cache_path in peek_slot()
When bch2_btree_iter_peek_slot() clones the iterator to search for the next key, and then discovers that the key from the cloned iterator is the key we want to return - we also want to save the iter->key_cache_path as well, for the update path. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
91dcad18d3
commit
3254c1b0e5
@ -2505,6 +2505,7 @@ struct bkey_s_c bch2_btree_iter_peek_slot(struct btree_iter *iter)
|
|||||||
k = bch2_btree_iter_peek_upto(&iter2, end);
|
k = bch2_btree_iter_peek_upto(&iter2, end);
|
||||||
|
|
||||||
if (k.k && !bkey_err(k)) {
|
if (k.k && !bkey_err(k)) {
|
||||||
|
swap(iter->key_cache_path, iter2.key_cache_path);
|
||||||
iter->k = iter2.k;
|
iter->k = iter2.k;
|
||||||
k.k = &iter->k;
|
k.k = &iter->k;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user