diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-02-09 20:15:03 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-03-13 21:22:24 -0400 |
commit | 3254c1b0e5af7fcb90f2feb928e5313c8a53149e (patch) | |
tree | 17daa885aab1ade04c350b47a8f782a73239c63b /fs/bcachefs/btree_iter.c | |
parent | 91dcad18d38849f1702e0d50f5598bb3614c8ff8 (diff) | |
download | linux-stable-3254c1b0e5af7fcb90f2feb928e5313c8a53149e.tar.gz linux-stable-3254c1b0e5af7fcb90f2feb928e5313c8a53149e.tar.bz2 linux-stable-3254c1b0e5af7fcb90f2feb928e5313c8a53149e.zip |
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>
Diffstat (limited to 'fs/bcachefs/btree_iter.c')
-rw-r--r-- | fs/bcachefs/btree_iter.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/bcachefs/btree_iter.c b/fs/bcachefs/btree_iter.c index 4cb43c676ee1..826ad6fa74cf 100644 --- a/fs/bcachefs/btree_iter.c +++ b/fs/bcachefs/btree_iter.c @@ -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); if (k.k && !bkey_err(k)) { + swap(iter->key_cache_path, iter2.key_cache_path); iter->k = iter2.k; k.k = &iter->k; } |