block/blk-mq.c: use kmalloc_array_node()
PATCH 22/131 block/blk-mq.c: use kmalloc_array_node()
From: Johannes Thumshirn <[email protected]>
Subject: block/blk-mq.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.
Signed-off-by Johannes Thumshirn <[email protected]>
Reviewed-by Christoph Lameter <[email protected]>
Cc Pekka Enberg <[email protected]>
Cc David Rientjes <[email protected]>
Cc Joonsoo Kim <[email protected]>
Cc Damien Le Moal <[email protected]>
Cc Christoph Hellwig <[email protected]>
Cc Jens Axboe <[email protected]>
Cc "David S. Miller" <[email protected]>
Cc Doug Ledford <[email protected]>
Cc Hal Rosenstock <[email protected]>
Cc Mike Marciniszyn <[email protected]>
Cc Santosh Shilimkar <[email protected]>
Cc Sean Hefty <[email protected]>
Cc Vlastimil Babka <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
block/blk-mq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
block/blk-mq.c renamed from block/blk-mq.c~block-use-kmalloc_array_node +1 -1
@@ -2047,7 +2047,7 @@ static int blk_mq_init_hctx(struct reque* Allocate space for all possible cpus to avoid allocation at * runtime */ - hctx->ctxs =kmalloc_node (nr_cpu_ids *sizeof (void *), + hctx->ctxs =kmalloc_array_node (nr_cpu_ids,sizeof (void *),GFP_KERNEL , node);if (!hctx->ctxs) goto unregister_cpu_notifier;
_