aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/umem_dmabuf.c
diff options
context:
space:
mode:
authorMaor Gottlieb <maorg@nvidia.com>2021-08-24 17:25:31 +0300
committerJason Gunthorpe <jgg@nvidia.com>2021-08-24 19:52:40 -0300
commit79fbd3e1241cea83dded06db2b8bcd5893d877d7 (patch)
tree3d0d8a7ef4a7efa7c74213e2c7f64d6549ffdb98 /drivers/infiniband/core/umem_dmabuf.c
parentlib/scatterlist: Fix wrong update of orig_nents (diff)
downloadlinux-dev-79fbd3e1241cea83dded06db2b8bcd5893d877d7.tar.xz
linux-dev-79fbd3e1241cea83dded06db2b8bcd5893d877d7.zip
RDMA: Use the sg_table directly and remove the opencoded version from umem
This allows using the normal sg_table APIs and makes all the code cleaner. Remove sgt, nents and nmapd from ib_umem. Link: https://lore.kernel.org/r/20210824142531.3877007-4-maorg@nvidia.com Signed-off-by: Maor Gottlieb <maorg@nvidia.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/core/umem_dmabuf.c')
-rw-r--r--drivers/infiniband/core/umem_dmabuf.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/infiniband/core/umem_dmabuf.c b/drivers/infiniband/core/umem_dmabuf.c
index c6e875619fac..e824baf4640d 100644
--- a/drivers/infiniband/core/umem_dmabuf.c
+++ b/drivers/infiniband/core/umem_dmabuf.c
@@ -55,9 +55,8 @@ int ib_umem_dmabuf_map_pages(struct ib_umem_dmabuf *umem_dmabuf)
cur += sg_dma_len(sg);
}
- umem_dmabuf->umem.sg_head.sgl = umem_dmabuf->first_sg;
- umem_dmabuf->umem.sg_head.nents = nmap;
- umem_dmabuf->umem.nmap = nmap;
+ umem_dmabuf->umem.sgt_append.sgt.sgl = umem_dmabuf->first_sg;
+ umem_dmabuf->umem.sgt_append.sgt.nents = nmap;
umem_dmabuf->sgt = sgt;
wait_fence: