diff options
author | Johannes Thumshirn <[email protected]> | 2017-11-15 17:32:33 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2017-11-15 18:21:02 -0800 |
commit | d904bfa79f9ca683d4e51c8d38f79f8be0f70f2a (patch) | |
tree | 6b1356bf6c977e310e55a04c7f089f39b8149653 | |
parent | 5799b255c491d853b73fb9e0e1760210315d06cd (diff) |
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.
Link: http://lkml.kernel.org/r/[email protected]
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]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | block/blk-mq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index b600463791ec..11097477eeab 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -2047,7 +2047,7 @@ static int blk_mq_init_hctx(struct request_queue *q, * 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; |