aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Thumshirn <[email protected]>2017-11-15 17:32:49 -0800
committerLinus Torvalds <[email protected]>2017-11-15 18:21:02 -0800
commitc413af877ffa8a8c28796c9d156cf40a83e58994 (patch)
tree34953d412674696c07177256070820bec4a33cfa
parent63762f50548aa27dc4c380638fa6fed43ae72258 (diff)
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 calculation. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Johannes Thumshirn <[email protected]> Reviewed-by: Christoph Lameter <[email protected]> Cc: Santosh Shilimkar <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Damien Le Moal <[email protected]> Cc: David Rientjes <[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: 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--net/rds/ib_fmr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/rds/ib_fmr.c b/net/rds/ib_fmr.c
index 86ef907067bb..e0f70c4051b6 100644
--- a/net/rds/ib_fmr.c
+++ b/net/rds/ib_fmr.c
@@ -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,
- rdsibdev_to_node(rds_ibdev));
+ dma_pages = kmalloc_array_node(sizeof(u64), page_cnt, GFP_ATOMIC,
+ rdsibdev_to_node(rds_ibdev));
if (!dma_pages) {
ib_dma_unmap_sg(dev, sg, nents, DMA_BIDIRECTIONAL);
return -ENOMEM;