Skip to content

Commit f30bcea

Browse files
RDMA: use dma_resv_wait() instead of extracting the fence
Use dma_resv_wait() instead of extracting the exclusive fence and waiting on it manually. Signed-off-by: Christian König <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Acked-by: Jason Gunthorpe <[email protected]> Cc: Jason Gunthorpe <[email protected]> Cc: Leon Romanovsky <[email protected]> Cc: Maor Gottlieb <[email protected]> Cc: Gal Pressman <[email protected]> Cc: [email protected] Cc: [email protected] Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 0941a4e commit f30bcea

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

drivers/infiniband/core/umem_dmabuf.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ int ib_umem_dmabuf_map_pages(struct ib_umem_dmabuf *umem_dmabuf)
1616
{
1717
struct sg_table *sgt;
1818
struct scatterlist *sg;
19-
struct dma_fence *fence;
2019
unsigned long start, end, cur = 0;
2120
unsigned int nmap = 0;
2221
int i;
@@ -68,11 +67,8 @@ int ib_umem_dmabuf_map_pages(struct ib_umem_dmabuf *umem_dmabuf)
6867
* may be not up-to-date. Wait for the exporter to finish
6968
* the migration.
7069
*/
71-
fence = dma_resv_excl_fence(umem_dmabuf->attach->dmabuf->resv);
72-
if (fence)
73-
return dma_fence_wait(fence, false);
74-
75-
return 0;
70+
return dma_resv_wait_timeout(umem_dmabuf->attach->dmabuf->resv, false,
71+
false, MAX_SCHEDULE_TIMEOUT);
7672
}
7773
EXPORT_SYMBOL(ib_umem_dmabuf_map_pages);
7874

0 commit comments

Comments
 (0)