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:
parent
774f13ac2b
commit
f0ac159871
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue