diff options
author | Jason Gunthorpe <jgg@mellanox.com> | 2019-01-09 11:15:16 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2019-01-10 17:07:45 -0700 |
commit | b0ea0fa5435f9df7213a9af098558f7dd584d8e8 (patch) | |
tree | fc1ac9ad0feffa7d990175633b130890b582d198 /drivers/infiniband/hw/ocrdma | |
parent | 6fa8f1afd3373c456e556815ebc8cb2330d6c3fe (diff) | |
download | linux-stable-b0ea0fa5435f9df7213a9af098558f7dd584d8e8.tar.gz linux-stable-b0ea0fa5435f9df7213a9af098558f7dd584d8e8.tar.bz2 linux-stable-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/ocrdma')
-rw-r--r-- | drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c index c46bed0c5513..a8b40cb7679e 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c @@ -916,7 +916,7 @@ struct ib_mr *ocrdma_reg_user_mr(struct ib_pd *ibpd, u64 start, u64 len, mr = kzalloc(sizeof(*mr), GFP_KERNEL); if (!mr) return ERR_PTR(status); - mr->umem = ib_umem_get(ibpd->uobject->context, start, len, acc, 0); + mr->umem = ib_umem_get(udata, start, len, acc, 0); if (IS_ERR(mr->umem)) { status = -EFAULT; goto umem_err; |