diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-12-08 01:51:04 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-01-01 11:47:43 -0500 |
commit | 5ce8b92da0b04faa4864845f43ed7357034e700d (patch) | |
tree | bcfae35ecbe7ee14fba52a4a31434766f46a56f8 /fs/bcachefs/btree_iter.c | |
parent | 4753bdeb26d55eebb415254f795b8be66cb80452 (diff) | |
download | linux-stable-5ce8b92da0b04faa4864845f43ed7357034e700d.tar.gz linux-stable-5ce8b92da0b04faa4864845f43ed7357034e700d.tar.bz2 linux-stable-5ce8b92da0b04faa4864845f43ed7357034e700d.zip |
bcachefs: minor bch2_btree_path_set_pos() optimization
bpos_eq() is cheaper than bpos_cmp()
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 | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/bcachefs/btree_iter.c b/fs/bcachefs/btree_iter.c index 79e6ec7b9a52..f16fefbb6497 100644 --- a/fs/bcachefs/btree_iter.c +++ b/fs/bcachefs/btree_iter.c @@ -1221,8 +1221,10 @@ struct btree_path *__bch2_btree_path_make_mut(struct btree_trans *trans, struct btree_path * __must_check __bch2_btree_path_set_pos(struct btree_trans *trans, struct btree_path *path, struct bpos new_pos, - bool intent, unsigned long ip, int cmp) + bool intent, unsigned long ip) { + int cmp = bpos_cmp(new_pos, path->pos); + bch2_trans_verify_not_in_restart(trans); EBUG_ON(!path->ref); |