aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/vmw_pvrdma/pvrdma_mr.c
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@mellanox.com>2019-01-09 11:15:16 +0200
committerJason Gunthorpe <jgg@mellanox.com>2019-01-10 17:07:45 -0700
commitb0ea0fa5435f9df7213a9af098558f7dd584d8e8 (patch)
treefc1ac9ad0feffa7d990175633b130890b582d198 /drivers/infiniband/hw/vmw_pvrdma/pvrdma_mr.c
parentIB/{core,uverbs}: Move ib_umem_xxx functions from ib_core to ib_uverbs (diff)
downloadlinux-dev-b0ea0fa5435f9df7213a9af098558f7dd584d8e8.tar.xz
linux-dev-b0ea0fa5435f9df7213a9af098558f7dd584d8e8.zip
IB/{core,hw}: Have ib_umem_get extract the ib_ucontext from ib_udata
ib_umem_get() can only be called in a method callback, which always has a udata parameter. This allows ib_umem_get() to derive the ucontext pointer directly from the udata without requiring the drivers to find it in some way or another. Signed-off-by: Jason Gunthorpe <jgg@mellanox.com> Signed-off-by: Shamir Rabinovitch <shamir.rabinovitch@oracle.com>
Diffstat (limited to 'drivers/infiniband/hw/vmw_pvrdma/pvrdma_mr.c')
-rw-r--r--drivers/infiniband/hw/vmw_pvrdma/pvrdma_mr.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_mr.c b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_mr.c
index fa96fa4fb829..a85884e90e84 100644
--- a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_mr.c
+++ b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_mr.c
@@ -126,8 +126,7 @@ struct ib_mr *pvrdma_reg_user_mr(struct ib_pd *pd, u64 start, u64 length,
return ERR_PTR(-EINVAL);
}
- umem = ib_umem_get(pd->uobject->context, start,
- length, access_flags, 0);
+ umem = ib_umem_get(udata, start, length, access_flags, 0);
if (IS_ERR(umem)) {
dev_warn(&dev->pdev->dev,
"could not get umem for mem region\n");