IB/umem: Fix use of npages/nmap fields
authorArtemy Kovalyov <artemyko@mellanox.com>
Tue, 14 Nov 2017 12:51:59 +0000 (14:51 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 24 Mar 2018 10:00:24 +0000 (11:00 +0100)
commit37c704e0ec7f33599866d41921379ffa8d8a7a9e
treeef474ae3c1493077af97b78e5b8c3997ef557b88
parent211a1e9f5efc7eafbe24ddb5601c71e5325db435
IB/umem: Fix use of npages/nmap fields

[ Upstream commit edf1a84fe37c51290e2c88154ecaf48dadff3d27 ]

In ib_umem structure npages holds original number of sg entries, while
nmap is number of DMA blocks returned by dma_map_sg.

Fixes: c5d76f130b28 ('IB/core: Add umem function to read data from user-space')
Signed-off-by: Artemy Kovalyov <artemyko@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/core/umem.c