RDMA/mlx5: Consolidate MR destruction to mlx5_ib_dereg_mr()
[linux-2.6-microblaze.git] / drivers / infiniband / core / umem_dmabuf.c
index f9b5162..0d65ce1 100644 (file)
@@ -168,6 +168,10 @@ void ib_umem_dmabuf_release(struct ib_umem_dmabuf *umem_dmabuf)
 {
        struct dma_buf *dmabuf = umem_dmabuf->attach->dmabuf;
 
+       dma_resv_lock(dmabuf->resv, NULL);
+       ib_umem_dmabuf_unmap_pages(umem_dmabuf);
+       dma_resv_unlock(dmabuf->resv);
+
        dma_buf_detach(dmabuf, umem_dmabuf->attach);
        dma_buf_put(dmabuf);
        kfree(umem_dmabuf);