diff options
author | Leon Romanovsky <leonro@mellanox.com> | 2019-01-30 12:48:58 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2019-01-30 21:15:47 -0700 |
commit | 0ad699c0edc97a864177679dd67f2ccd73b07cb7 (patch) | |
tree | 6c089d7e15abb819b26d60543ddf752794c39395 /drivers/infiniband/core/nldev.c | |
parent | RDMA/nldev: Prepare CAP_NET_ADMIN checks for .doit callbacks (diff) | |
download | linux-dev-0ad699c0edc97a864177679dd67f2ccd73b07cb7.tar.xz linux-dev-0ad699c0edc97a864177679dd67f2ccd73b07cb7.zip |
RDMA/core: Simplify restrack interface
In the current implementation, we have one restrack root per-device and
all users are simply providing it directly. Let's simplify the interface
and have callers provide the ib_device and internally access the
restrack_root.
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/core/nldev.c')
-rw-r--r-- | drivers/infiniband/core/nldev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/core/nldev.c b/drivers/infiniband/core/nldev.c index 1742ff4fbf79..ee98fc9058b1 100644 --- a/drivers/infiniband/core/nldev.c +++ b/drivers/infiniband/core/nldev.c @@ -314,7 +314,6 @@ static int fill_res_info(struct sk_buff *msg, struct ib_device *device) [RDMA_RESTRACK_CTX] = "ctx", }; - struct rdma_restrack_root *res = &device->res; struct nlattr *table_attr; int ret, i, curr; @@ -328,7 +327,8 @@ static int fill_res_info(struct sk_buff *msg, struct ib_device *device) for (i = 0; i < RDMA_RESTRACK_MAX; i++) { if (!names[i]) continue; - curr = rdma_restrack_count(res, i, task_active_pid_ns(current)); + curr = rdma_restrack_count(device, i, + task_active_pid_ns(current)); ret = fill_res_info_entry(msg, names[i], curr); if (ret) goto err; |