treewide: Use array_size() in vzalloc()
[linux-block.git] / drivers / md / bcache / super.c
index ec5f70d021dee92d8609f7023f42c31cc53ba018..fa4058e4320289b11968f754526931f46079408a 100644 (file)
@@ -2041,8 +2041,8 @@ static int cache_alloc(struct cache *ca)
            !init_fifo(&ca->free[RESERVE_NONE], free, GFP_KERNEL) ||
            !init_fifo(&ca->free_inc,   free << 2, GFP_KERNEL) ||
            !init_heap(&ca->heap,       free << 3, GFP_KERNEL) ||
-           !(ca->buckets       = vzalloc(sizeof(struct bucket) *
-                                         ca->sb.nbuckets)) ||
+           !(ca->buckets       = vzalloc(array_size(sizeof(struct bucket),
+                                                    ca->sb.nbuckets))) ||
            !(ca->prio_buckets  = kzalloc(array3_size(sizeof(uint64_t),
                                                      prio_buckets(ca), 2),
                                          GFP_KERNEL)) ||