diff options
author | Shamir Rabinovitch <shamir.rabinovitch@oracle.com> | 2019-03-31 19:10:06 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2019-04-01 14:59:35 -0300 |
commit | bdeacabd1a5fb4c0274b949d7220501c3401a3b4 (patch) | |
tree | 2d5e2236b422c2348d29b0e14fb0852c9306e6db /drivers/infiniband/core/uverbs_cmd.c | |
parent | c4367a26357be501338e41ceae7ebb7ce57064e5 (diff) | |
download | linux-stable-bdeacabd1a5fb4c0274b949d7220501c3401a3b4.tar.gz linux-stable-bdeacabd1a5fb4c0274b949d7220501c3401a3b4.tar.bz2 linux-stable-bdeacabd1a5fb4c0274b949d7220501c3401a3b4.zip |
IB: Remove 'uobject->context' dependency in object destroy APIs
Now that we have the udata passed to all the ib_xxx object destroy APIs
and the additional macro 'rdma_udata_to_drv_context' to get the
ib_ucontext from ib_udata stored in uverbs_attr_bundle, we can finally
start to remove the dependency of the drivers in the
ib_xxx->uobject->context.
Signed-off-by: Shamir Rabinovitch <shamir.rabinovitch@oracle.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/core/uverbs_cmd.c')
-rw-r--r-- | drivers/infiniband/core/uverbs_cmd.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c index fe63dfd5f1b6..da31dba33fc5 100644 --- a/drivers/infiniband/core/uverbs_cmd.c +++ b/drivers/infiniband/core/uverbs_cmd.c @@ -670,17 +670,18 @@ static int ib_uverbs_close_xrcd(struct uverbs_attr_bundle *attrs) } int ib_uverbs_dealloc_xrcd(struct ib_uobject *uobject, struct ib_xrcd *xrcd, - enum rdma_remove_reason why, struct ib_udata *udata) + enum rdma_remove_reason why, + struct uverbs_attr_bundle *attrs) { struct inode *inode; int ret; - struct ib_uverbs_device *dev = uobject->context->ufile->device; + struct ib_uverbs_device *dev = attrs->ufile->device; inode = xrcd->inode; if (inode && !atomic_dec_and_test(&xrcd->usecnt)) return 0; - ret = ib_dealloc_xrcd(xrcd, udata); + ret = ib_dealloc_xrcd(xrcd, &attrs->driver_udata); if (ib_is_destroy_retryable(ret, why, uobject)) { atomic_inc(&xrcd->usecnt); |