mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
mm/mempool.c: use kmalloc_array_node()
Now that we have a NUMA-aware version of kmalloc_array() we can use it instead of kmalloc_node() without an overflow check in the size calculation. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Johannes Thumshirn <[email protected]> Reviewed-by: Christoph Lameter <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Damien Le Moal <[email protected]> Cc: David Rientjes <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Doug Ledford <[email protected]> Cc: Hal Rosenstock <[email protected]> Cc: Jens Axboe <[email protected]> Cc: Joonsoo Kim <[email protected]> Cc: Mike Marciniszyn <[email protected]> Cc: Pekka Enberg <[email protected]> Cc: Santosh Shilimkar <[email protected]> Cc: Sean Hefty <[email protected]> Cc: Vlastimil Babka <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
3c07347841
commit
63762f5054
1 changed files with 1 additions and 1 deletions
|
|
@ -189,7 +189,7 @@ mempool_t *mempool_create_node(int min_nr, mempool_alloc_t *alloc_fn,
|
|||
pool = kzalloc_node(sizeof(*pool), gfp_mask, node_id);
|
||||
if (!pool)
|
||||
return NULL;
|
||||
pool->elements = kmalloc_node(min_nr * sizeof(void *),
|
||||
pool->elements = kmalloc_array_node(min_nr, sizeof(void *),
|
||||
gfp_mask, node_id);
|
||||
if (!pool->elements) {
|
||||
kfree(pool);
|
||||
|
|
|
|||
Loading…
Reference in a new issue