summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2022-10-09 02:25:53 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-02-03 21:48:41 -0500
commit42c53c02982c232ece0b2a3daef37ce2764bada0 (patch)
treecf76292e67f6340dd4fdb0707f0bf04a748b20dc
parent243a8d6fe27444e9773e3086df7037345efdd60a (diff)
bcachefs: Use btree_type_has_ptrs() more consistently
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r--fs/bcachefs/btree_gc.c2
-rw-r--r--fs/bcachefs/sysfs.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/btree_gc.c b/fs/bcachefs/btree_gc.c
index 5b7f7cd3252a..fd89165e08a9 100644
--- a/fs/bcachefs/btree_gc.c
+++ b/fs/bcachefs/btree_gc.c
@@ -1966,7 +1966,7 @@ int bch2_gc_gens(struct bch_fs *c)
}
for (i = 0; i < BTREE_ID_NR; i++)
- if ((1 << i) & BTREE_ID_HAS_PTRS) {
+ if (btree_type_has_ptrs(i)) {
struct btree_iter iter;
struct bkey_s_c k;
diff --git a/fs/bcachefs/sysfs.c b/fs/bcachefs/sysfs.c
index 50b3ba92c5ae..a27ceabd5e49 100644
--- a/fs/bcachefs/sysfs.c
+++ b/fs/bcachefs/sysfs.c
@@ -298,7 +298,7 @@ static int bch2_compression_stats_to_text(struct printbuf *out, struct bch_fs *c
bch2_trans_init(&trans, c, 0, 0);
for (id = 0; id < BTREE_ID_NR; id++) {
- if (!((1U << id) & BTREE_ID_HAS_PTRS))
+ if (!btree_type_has_ptrs(id))
continue;
for_each_btree_key(&trans, iter, id, POS_MIN,