Since we are using bpos_nosnap_successor, it's more reasonable to use bkey_eq instead of bpos_eq.
Signed-off-by: Alan Huang <mmpgour...@gmail.com> --- fs/bcachefs/alloc_background.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/bcachefs/alloc_background.c b/fs/bcachefs/alloc_background.c index 81e2ae4bb400..ac27735c11e5 100644 --- a/fs/bcachefs/alloc_background.c +++ b/fs/bcachefs/alloc_background.c @@ -1057,7 +1057,7 @@ static struct bkey_s_c bch2_get_key_or_hole(struct btree_trans *trans, struct bt bch2_trans_copy_iter(trans, &iter2, iter); struct btree_path *path = btree_iter_path(trans, iter); - if (!bpos_eq(path->l[0].b->key.k.p, SPOS_MAX)) + if (!bkey_eq(path->l[0].b->key.k.p, POS_MAX)) end = bkey_min(end, bpos_nosnap_successor(path->l[0].b->key.k.p)); end = bkey_min(end, POS(iter->pos.inode, iter->pos.offset + U32_MAX - 1)); -- 2.48.1