diff options
author | Jason Gunthorpe <jgg@mellanox.com> | 2019-01-09 10:15:16 +0100 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2019-01-11 01:07:45 +0100 |
commit | b0ea0fa5435f9df7213a9af098558f7dd584d8e8 (patch) | |
tree | fc1ac9ad0feffa7d990175633b130890b582d198 /drivers/infiniband/hw/cxgb4 | |
parent | IB/{core,uverbs}: Move ib_umem_xxx functions from ib_core to ib_uverbs (diff) | |
download | linux-b0ea0fa5435f9df7213a9af098558f7dd584d8e8.tar.xz linux-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/cxgb4')
-rw-r--r-- | drivers/infiniband/hw/cxgb4/mem.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/cxgb4/mem.c b/drivers/infiniband/hw/cxgb4/mem.c index 7b76e6f81aeb..96760a36b9fc 100644 --- a/drivers/infiniband/hw/cxgb4/mem.c +++ b/drivers/infiniband/hw/cxgb4/mem.c @@ -537,7 +537,7 @@ struct ib_mr *c4iw_reg_user_mr(struct ib_pd *pd, u64 start, u64 length, mhp->rhp = rhp; - mhp->umem = ib_umem_get(pd->uobject->context, start, length, acc, 0); + mhp->umem = ib_umem_get(udata, start, length, acc, 0); if (IS_ERR(mhp->umem)) goto err_free_skb; |