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/20170927082038.3782-7-jthumshirn@suse.de Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Christoph Lameter <cl@linux.com> Cc: Santosh Shilimkar <santosh.shilimkar@oracle.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Christoph Hellwig <hch@lst.de> Cc: Damien Le Moal <damien.lemoal@wdc.com> Cc: David Rientjes <rientjes@google.com> Cc: Doug Ledford <dledford@redhat.com> Cc: Hal Rosenstock <hal.rosenstock@gmail.com> Cc: Jens Axboe <axboe@kernel.dk> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: Mike Marciniszyn <infinipath@intel.com> Cc: Pekka Enberg <penberg@kernel.org> Cc: Sean Hefty <sean.hefty@intel.com> Cc: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
63762f5054
commit
c413af877f
|
@ -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 New Issue