diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-03-21 23:55:25 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:08:56 +0300 |
commit | e0ba3b6429a4b5995b06dc46afdf4d3530d156bb (patch) | |
tree | 3800b2a355122f709152ea68579a679f39c0cef8 /fs/bcachefs/ec.c | |
parent | cb16bfaa86f09fae33a712510aa51a03ca370d63 (diff) | |
download | linux-e0ba3b6429a4b5995b06dc46afdf4d3530d156bb.tar.xz |
bcachefs: Replace bch2_btree_iter_next() calls with bch2_btree_iter_advance
The way btree iterators work internally has been changing, particularly
with the iter->real_pos changes, and bch2_btree_iter_next() is no longer
hyper optimized - it's just advance followed by peek, so it's more
efficient to just call advance where we're not using the return value of
bch2_btree_iter_next().
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/ec.c')
-rw-r--r-- | fs/bcachefs/ec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/ec.c b/fs/bcachefs/ec.c index bdce37981c5c..370f9e6916f3 100644 --- a/fs/bcachefs/ec.c +++ b/fs/bcachefs/ec.c @@ -842,13 +842,13 @@ static int ec_stripe_update_ptrs(struct bch_fs *c, struct bch_extent_ptr *ptr, *ec_ptr = NULL; if (extent_has_stripe_ptr(k, s->key.k.p.offset)) { - bch2_btree_iter_next(iter); + bch2_btree_iter_advance(iter); continue; } block = bkey_matches_stripe(&s->key.v, k); if (block < 0) { - bch2_btree_iter_next(iter); + bch2_btree_iter_advance(iter); continue; } |