From: Kent Overstreet Date: Sun, 9 Oct 2022 06:25:53 +0000 (-0400) Subject: bcachefs: Use btree_type_has_ptrs() more consistently X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=2da671dc4a62da6de4ce0de529fc3e80f1f8f603;p=linux.git bcachefs: Use btree_type_has_ptrs() more consistently Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/btree_gc.c b/fs/bcachefs/btree_gc.c index 77a1fe81ac356..5d19029477cfc 100644 --- a/fs/bcachefs/btree_gc.c +++ b/fs/bcachefs/btree_gc.c @@ -1963,7 +1963,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 50b3ba92c5ae9..a27ceabd5e496 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,