diff options
Diffstat (limited to 'drivers/md/dm-cache-policy-smq.c')
-rw-r--r-- | drivers/md/dm-cache-policy-smq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm-cache-policy-smq.c b/drivers/md/dm-cache-policy-smq.c index 4ab23d0075f6..4d69b6f4129e 100644 --- a/drivers/md/dm-cache-policy-smq.c +++ b/drivers/md/dm-cache-policy-smq.c | |||
@@ -588,7 +588,7 @@ static int h_init(struct smq_hash_table *ht, struct entry_space *es, unsigned nr | |||
588 | nr_buckets = roundup_pow_of_two(max(nr_entries / 4u, 16u)); | 588 | nr_buckets = roundup_pow_of_two(max(nr_entries / 4u, 16u)); |
589 | ht->hash_bits = __ffs(nr_buckets); | 589 | ht->hash_bits = __ffs(nr_buckets); |
590 | 590 | ||
591 | ht->buckets = vmalloc(sizeof(*ht->buckets) * nr_buckets); | 591 | ht->buckets = vmalloc(array_size(nr_buckets, sizeof(*ht->buckets))); |
592 | if (!ht->buckets) | 592 | if (!ht->buckets) |
593 | return -ENOMEM; | 593 | return -ENOMEM; |
594 | 594 | ||