From: Heinz Mauelshagen Date: Tue, 7 Feb 2023 22:29:02 +0000 (+0100) Subject: dm clone: prefer kvmalloc_array() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=f0ac1598712ff0f7b985d58546449e232487ee0e;p=linux.git dm clone: prefer kvmalloc_array() Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer --- diff --git a/drivers/md/dm-clone-target.c b/drivers/md/dm-clone-target.c index 29e0b85eeaf09..f38a27604c7ab 100644 --- a/drivers/md/dm-clone-target.c +++ b/drivers/md/dm-clone-target.c @@ -580,7 +580,7 @@ static int hash_table_init(struct clone *clone) sz = 1 << HASH_TABLE_BITS; - clone->ht = kvmalloc(sz * sizeof(struct hash_table_bucket), GFP_KERNEL); + clone->ht = kvmalloc_array(sz, sizeof(struct hash_table_bucket), GFP_KERNEL); if (!clone->ht) return -ENOMEM;