Skip to content

Commit 21c9c5c

Browse files
committed
RDMA/umem: Prepare to dynamic dma-buf locking specification
Prepare InfiniBand drivers to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Acked-by: Jason Gunthorpe <[email protected]> Acked-by: Christian König <[email protected]> Signed-off-by: Dmitry Osipenko <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 03a75fd commit 21c9c5c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/infiniband/core/umem_dmabuf.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ int ib_umem_dmabuf_map_pages(struct ib_umem_dmabuf *umem_dmabuf)
2626
if (umem_dmabuf->sgt)
2727
goto wait_fence;
2828

29-
sgt = dma_buf_map_attachment(umem_dmabuf->attach, DMA_BIDIRECTIONAL);
29+
sgt = dma_buf_map_attachment_unlocked(umem_dmabuf->attach,
30+
DMA_BIDIRECTIONAL);
3031
if (IS_ERR(sgt))
3132
return PTR_ERR(sgt);
3233

@@ -102,8 +103,8 @@ void ib_umem_dmabuf_unmap_pages(struct ib_umem_dmabuf *umem_dmabuf)
102103
umem_dmabuf->last_sg_trim = 0;
103104
}
104105

105-
dma_buf_unmap_attachment(umem_dmabuf->attach, umem_dmabuf->sgt,
106-
DMA_BIDIRECTIONAL);
106+
dma_buf_unmap_attachment_unlocked(umem_dmabuf->attach, umem_dmabuf->sgt,
107+
DMA_BIDIRECTIONAL);
107108

108109
umem_dmabuf->sgt = NULL;
109110
}

0 commit comments

Comments
 (0)