dm clone: prefer kvmalloc_array()

Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
This commit is contained in:
Heinz Mauelshagen 2023-02-07 23:29:02 +01:00 committed by Mike Snitzer
parent 774f13ac2b
commit f0ac159871
1 changed files with 1 additions and 1 deletions

View File

@ -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;