Commit c413af87 authored by Johannes Thumshirn's avatar Johannes Thumshirn Committed by Linus Torvalds

net/rds/ib_fmr.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

Link: default avatarJohannes Thumshirn <>
Reviewed-by: default avatarChristoph Lameter <>
Cc: Santosh Shilimkar <>
Cc: "David S. Miller" <>
Cc: Christoph Hellwig <>
Cc: Damien Le Moal <>
Cc: David Rientjes <>
Cc: Doug Ledford <>
Cc: Hal Rosenstock <>
Cc: Jens Axboe <>
Cc: Joonsoo Kim <>
Cc: Mike Marciniszyn <>
Cc: Pekka Enberg <>
Cc: Sean Hefty <>
Cc: Vlastimil Babka <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 63762f50
......@@ -139,8 +139,8 @@ static int rds_ib_map_fmr(struct rds_ib_device *rds_ibdev,
return -EINVAL;
dma_pages = kmalloc_node(sizeof(u64) * page_cnt, GFP_ATOMIC,
dma_pages = kmalloc_array_node(sizeof(u64), page_cnt, GFP_ATOMIC,
if (!dma_pages) {
ib_dma_unmap_sg(dev, sg, nents, DMA_BIDIRECTIONAL);
return -ENOMEM;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment