mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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]>
This commit is contained in:
parent
63762f5054
commit
c413af877f
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue