Skip to content

Commit e841ad8

Browse files
committed
xen/gntdev: Prepare to dynamic dma-buf locking specification
Prepare gntdev driver to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Acked-by: Juergen Gross <[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 791da5c commit e841ad8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/xen/gntdev-dmabuf.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ dmabuf_imp_to_refs(struct gntdev_dmabuf_priv *priv, struct device *dev,
600600

601601
gntdev_dmabuf->u.imp.attach = attach;
602602

603-
sgt = dma_buf_map_attachment(attach, DMA_BIDIRECTIONAL);
603+
sgt = dma_buf_map_attachment_unlocked(attach, DMA_BIDIRECTIONAL);
604604
if (IS_ERR(sgt)) {
605605
ret = ERR_CAST(sgt);
606606
goto fail_detach;
@@ -658,7 +658,7 @@ dmabuf_imp_to_refs(struct gntdev_dmabuf_priv *priv, struct device *dev,
658658
fail_end_access:
659659
dmabuf_imp_end_foreign_access(gntdev_dmabuf->u.imp.refs, count);
660660
fail_unmap:
661-
dma_buf_unmap_attachment(attach, sgt, DMA_BIDIRECTIONAL);
661+
dma_buf_unmap_attachment_unlocked(attach, sgt, DMA_BIDIRECTIONAL);
662662
fail_detach:
663663
dma_buf_detach(dma_buf, attach);
664664
fail_free_obj:
@@ -708,8 +708,8 @@ static int dmabuf_imp_release(struct gntdev_dmabuf_priv *priv, u32 fd)
708708
attach = gntdev_dmabuf->u.imp.attach;
709709

710710
if (gntdev_dmabuf->u.imp.sgt)
711-
dma_buf_unmap_attachment(attach, gntdev_dmabuf->u.imp.sgt,
712-
DMA_BIDIRECTIONAL);
711+
dma_buf_unmap_attachment_unlocked(attach, gntdev_dmabuf->u.imp.sgt,
712+
DMA_BIDIRECTIONAL);
713713
dma_buf = attach->dmabuf;
714714
dma_buf_detach(attach->dmabuf, attach);
715715
dma_buf_put(dma_buf);

0 commit comments

Comments
 (0)