diff --git a/fs/bcachefs/movinggc.c b/fs/bcachefs/movinggc.c index d658be90f737..d8fd2634623f 100644 --- a/fs/bcachefs/movinggc.c +++ b/fs/bcachefs/movinggc.c @@ -171,7 +171,9 @@ static int bch2_copygc_get_buckets(struct moving_context *ctxt, lru_pos(BCH_LRU_FRAGMENTATION_START, 0, 0), lru_pos(BCH_LRU_FRAGMENTATION_START, U64_MAX, LRU_TIME_MAX), 0, k, ({ - struct move_bucket b = { .k.bucket = u64_to_bucket(k.k->p.offset) }; + struct move_bucket b; + memset(&b.k.bucket, 0, sizeof(b.k.bucket)); + b.k.bucket = u64_to_bucket(k.k->p.offset); int ret2 = 0; saw++;