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>
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user