diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-12-11 00:03:44 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-01-01 11:47:44 -0500 |
commit | 542e6396740aed017905e3ad02dbf07a4bf7369d (patch) | |
tree | 9de394cbe3b31ff451e676f0947cebd1e25e5755 /fs/bcachefs/btree_iter.c | |
parent | 566eabd36faca007fb14d05e387b7aad4a7af219 (diff) | |
download | linux-stable-542e6396740aed017905e3ad02dbf07a4bf7369d.tar.gz linux-stable-542e6396740aed017905e3ad02dbf07a4bf7369d.tar.bz2 linux-stable-542e6396740aed017905e3ad02dbf07a4bf7369d.zip |
bcachefs: bch2_btree_iter_peek_prev() no longer uses path->idx
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 | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/bcachefs/btree_iter.c b/fs/bcachefs/btree_iter.c index c997c59214af..30242e95e617 100644 --- a/fs/bcachefs/btree_iter.c +++ b/fs/bcachefs/btree_iter.c @@ -2245,10 +2245,10 @@ struct bkey_s_c bch2_btree_iter_peek_prev(struct btree_iter *iter) { struct btree_trans *trans = iter->trans; struct bpos search_key = iter->pos; - struct btree_path *saved_path = NULL; struct bkey_s_c k; struct bkey saved_k; const struct bch_val *saved_v; + btree_path_idx_t saved_path = 0; int ret; EBUG_ON(btree_iter_path(trans, iter)->cached || @@ -2299,8 +2299,8 @@ struct bkey_s_c bch2_btree_iter_peek_prev(struct btree_iter *iter) if (saved_path && !bkey_eq(k.k->p, saved_k.p)) { bch2_path_put_nokeep(trans, iter->path, iter->flags & BTREE_ITER_INTENT); - iter->path = saved_path->idx; - saved_path = NULL; + iter->path = saved_path; + saved_path = 0; iter->k = saved_k; k.v = saved_v; goto got_key; @@ -2310,9 +2310,9 @@ struct bkey_s_c bch2_btree_iter_peek_prev(struct btree_iter *iter) iter->snapshot, k.k->p.snapshot)) { if (saved_path) - bch2_path_put_nokeep(trans, saved_path->idx, + bch2_path_put_nokeep(trans, saved_path, iter->flags & BTREE_ITER_INTENT); - saved_path = trans->paths + btree_path_clone(trans, iter->path, + saved_path = btree_path_clone(trans, iter->path, iter->flags & BTREE_ITER_INTENT); path = btree_iter_path(trans, iter); saved_k = *k.k; @@ -2354,7 +2354,7 @@ got_key: iter->pos.snapshot = iter->snapshot; out_no_locked: if (saved_path) - bch2_path_put_nokeep(trans, saved_path->idx, iter->flags & BTREE_ITER_INTENT); + bch2_path_put_nokeep(trans, saved_path, iter->flags & BTREE_ITER_INTENT); bch2_btree_iter_verify_entry_exit(iter); bch2_btree_iter_verify(iter); |