diff --git a/fs/bcachefs/btree_iter.c b/fs/bcachefs/btree_iter.c index 39c89914cb53..ccf2e41b8aa7 100644 --- a/fs/bcachefs/btree_iter.c +++ b/fs/bcachefs/btree_iter.c @@ -258,7 +258,7 @@ static void bch2_btree_iter_verify(struct btree_iter *iter) BUG_ON((iter->flags & BTREE_ITER_IS_EXTENTS) && (iter->flags & BTREE_ITER_ALL_SNAPSHOTS)); - BUG_ON(!(iter->flags & __BTREE_ITER_ALL_SNAPSHOTS) && + BUG_ON(!(iter->flags & BTREE_ITER_SNAPSHOT_FIELD) && (iter->flags & BTREE_ITER_ALL_SNAPSHOTS) && !btree_type_has_snapshot_field(iter->btree_id)); @@ -2809,7 +2809,7 @@ void bch2_trans_node_iter_init(struct btree_trans *trans, unsigned flags) { flags |= BTREE_ITER_NOT_EXTENTS; - flags |= __BTREE_ITER_ALL_SNAPSHOTS; + flags |= BTREE_ITER_SNAPSHOT_FIELD; flags |= BTREE_ITER_ALL_SNAPSHOTS; bch2_trans_iter_init_common(trans, iter, btree_id, pos, locks_want, depth, diff --git a/fs/bcachefs/btree_iter.h b/fs/bcachefs/btree_iter.h index 52030929da0a..57323d5e94a9 100644 --- a/fs/bcachefs/btree_iter.h +++ b/fs/bcachefs/btree_iter.h @@ -420,7 +420,7 @@ static inline unsigned __bch2_btree_iter_flags(struct btree_trans *trans, btree_id_is_extents(btree_id)) flags |= BTREE_ITER_IS_EXTENTS; - if (!(flags & __BTREE_ITER_ALL_SNAPSHOTS) && + if (!(flags & BTREE_ITER_SNAPSHOT_FIELD) && !btree_type_has_snapshot_field(btree_id)) flags &= ~BTREE_ITER_ALL_SNAPSHOTS; diff --git a/fs/bcachefs/btree_types.h b/fs/bcachefs/btree_types.h index c69b233c41bb..d4649129e5d3 100644 --- a/fs/bcachefs/btree_types.h +++ b/fs/bcachefs/btree_types.h @@ -210,7 +210,7 @@ static const __maybe_unused u16 BTREE_ITER_CACHED = 1 << 5; static const __maybe_unused u16 BTREE_ITER_WITH_KEY_CACHE = 1 << 6; static const __maybe_unused u16 BTREE_ITER_WITH_UPDATES = 1 << 7; static const __maybe_unused u16 BTREE_ITER_WITH_JOURNAL = 1 << 8; -static const __maybe_unused u16 __BTREE_ITER_ALL_SNAPSHOTS = 1 << 9; +static const __maybe_unused u16 BTREE_ITER_SNAPSHOT_FIELD = 1 << 9; static const __maybe_unused u16 BTREE_ITER_ALL_SNAPSHOTS = 1 << 10; static const __maybe_unused u16 BTREE_ITER_FILTER_SNAPSHOTS = 1 << 11; static const __maybe_unused u16 BTREE_ITER_NOPRESERVE = 1 << 12;