aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/rdma_core.c
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@mellanox.com>2018-07-04 08:50:23 +0300
committerJason Gunthorpe <jgg@mellanox.com>2018-07-04 13:47:01 -0600
commit87fc2a620a398e970872064841b0db7cc6d0149f (patch)
treefff3d636ab33a8ea70c3b95886d21f4a7da2b589 /drivers/infiniband/core/rdma_core.c
parentMerge branch 'mlx5-dump-fill-mkey' into rdma.git for-next (diff)
downloadlinux-dev-87fc2a620a398e970872064841b0db7cc6d0149f.tar.xz
linux-dev-87fc2a620a398e970872064841b0db7cc6d0149f.zip
RDMA/uverbs: Store the specs_root in the struct ib_uverbs_device
The specs are required to operate the uverbs file, so they belong inside the ib_uverbs_device, not inside the ib_device. The spec passed in the ib_device is just a communication from the driver and should not be used during runtime. This also changes the lifetime of the spec memory to match the ib_uverbs_device, however at this time the spec_root can still contain driver pointers after disassociation, so it cannot be used if ib_dev is NULL. This is preparation for another series. Signed-off-by: Jason Gunthorpe <jgg@mellanox.com> Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Diffstat (limited to 'drivers/infiniband/core/rdma_core.c')
-rw-r--r--drivers/infiniband/core/rdma_core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/core/rdma_core.c b/drivers/infiniband/core/rdma_core.c
index 2ddf1c716ba8..c67bcdda5760 100644
--- a/drivers/infiniband/core/rdma_core.c
+++ b/drivers/infiniband/core/rdma_core.c
@@ -52,10 +52,10 @@ int uverbs_ns_idx(u16 *id, unsigned int ns_count)
return ret;
}
-const struct uverbs_object_spec *uverbs_get_object(const struct ib_device *ibdev,
+const struct uverbs_object_spec *uverbs_get_object(struct ib_uverbs_file *ufile,
uint16_t object)
{
- const struct uverbs_root_spec *object_hash = ibdev->specs_root;
+ const struct uverbs_root_spec *object_hash = ufile->device->specs_root;
const struct uverbs_object_spec_hash *objects;
int ret = uverbs_ns_idx(&object, object_hash->num_buckets);