summaryrefslogtreecommitdiff
path: root/fs/bcachefs/btree_gc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/bcachefs/btree_gc.c')
-rw-r--r--fs/bcachefs/btree_gc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/bcachefs/btree_gc.c b/fs/bcachefs/btree_gc.c
index 532248778534..965b4a58ba9a 100644
--- a/fs/bcachefs/btree_gc.c
+++ b/fs/bcachefs/btree_gc.c
@@ -270,7 +270,9 @@ static void bch_mark_metadata(struct cache_set *c)
for (i = ca->prio_buckets;
i < ca->prio_buckets + prio_buckets(ca) * 2; i++)
- bch_mark_metadata_bucket(ca, &ca->buckets[*i], true);
+ if (*i)
+ bch_mark_metadata_bucket(ca, &ca->buckets[*i],
+ true);
spin_unlock(&ca->prio_buckets_lock);
}