diff options
author | 2019-04-01 17:08:24 -0300 | |
---|---|---|
committer | 2019-04-08 13:05:25 -0300 | |
commit | feec576a6af299143e40dcfb34b6c5604e4ff397 (patch) | |
tree | 6de5b0eeab5e8ffb12e544fd54a04bf0050cf906 /drivers/infiniband/core/rdma_core.c | |
parent | IB/mlx5: Remove references to uboject->context (diff) | |
download | linux-dev-feec576a6af299143e40dcfb34b6c5604e4ff397.tar.xz linux-dev-feec576a6af299143e40dcfb34b6c5604e4ff397.zip |
IB: When attrs.udata/ufile is available use that instead of uobject
The ucontext and ufile should not be accessed via the uobject, all these
cases have an attrs so use that instead.
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/core/rdma_core.c')
-rw-r--r-- | drivers/infiniband/core/rdma_core.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/infiniband/core/rdma_core.c b/drivers/infiniband/core/rdma_core.c index d0a6755c0562..e9c905220abd 100644 --- a/drivers/infiniband/core/rdma_core.c +++ b/drivers/infiniband/core/rdma_core.c @@ -128,7 +128,7 @@ static int uverbs_destroy_uobject(struct ib_uobject *uobj, enum rdma_remove_reason reason, struct uverbs_attr_bundle *attrs) { - struct ib_uverbs_file *ufile = uobj->ufile; + struct ib_uverbs_file *ufile = attrs->ufile; unsigned long flags; int ret; @@ -200,7 +200,7 @@ static int uverbs_destroy_uobject(struct ib_uobject *uobj, */ int uobj_destroy(struct ib_uobject *uobj, struct uverbs_attr_bundle *attrs) { - struct ib_uverbs_file *ufile = uobj->ufile; + struct ib_uverbs_file *ufile = attrs->ufile; int ret; down_read(&ufile->hw_destroy_rwsem); @@ -655,7 +655,7 @@ static int alloc_commit_fd_uobject(struct ib_uobject *uobj) int __must_check rdma_alloc_commit_uobject(struct ib_uobject *uobj, struct uverbs_attr_bundle *attrs) { - struct ib_uverbs_file *ufile = uobj->ufile; + struct ib_uverbs_file *ufile = attrs->ufile; int ret; /* alloc_commit consumes the uobj kref */ |