diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-03-21 16:55:25 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:56 -0400 |
commit | e0ba3b6429a4b5995b06dc46afdf4d3530d156bb (patch) | |
tree | 3800b2a355122f709152ea68579a679f39c0cef8 /fs/bcachefs/migrate.c | |
parent | cb16bfaa86f09fae33a712510aa51a03ca370d63 (diff) | |
download | linux-stable-e0ba3b6429a4b5995b06dc46afdf4d3530d156bb.tar.gz linux-stable-e0ba3b6429a4b5995b06dc46afdf4d3530d156bb.tar.bz2 linux-stable-e0ba3b6429a4b5995b06dc46afdf4d3530d156bb.zip |
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/migrate.c')
-rw-r--r-- | fs/bcachefs/migrate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/migrate.c b/fs/bcachefs/migrate.c index 4d8b4169923d..ef69a19f494a 100644 --- a/fs/bcachefs/migrate.c +++ b/fs/bcachefs/migrate.c @@ -53,7 +53,7 @@ static int __bch2_dev_usrdata_drop(struct bch_fs *c, unsigned dev_idx, int flags while ((k = bch2_btree_iter_peek(iter)).k && !(ret = bkey_err(k))) { if (!bch2_bkey_has_device(k, dev_idx)) { - bch2_btree_iter_next(iter); + bch2_btree_iter_advance(iter); continue; } |