diff options
author | Leon Romanovsky <leonro@mellanox.com> | 2020-09-22 12:11:05 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2020-09-22 19:47:35 -0300 |
commit | c34a23c28c6b0045b1f21649de30f68da72547af (patch) | |
tree | b4b0772aaa3fa5f49f68933978076b81102f8b38 /drivers/infiniband/core/core_priv.h | |
parent | 13ef5539def732dc7b9c58c320d97a0a95b52634 (diff) |
RDMA/restrack: Simplify restrack tracking in kernel flows
Have a single rdma_restrack_add() that adds an entry, there is no reason
to split the user/kernel here, the rdma_restrack_set_task() is responsible
for this difference.
This patch prepares the code to the future requirement of making restrack
is mandatory for managing ib objects.
Link: https://lore.kernel.org/r/20200922091106.2152715-5-leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/core/core_priv.h')
-rw-r--r-- | drivers/infiniband/core/core_priv.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/infiniband/core/core_priv.h b/drivers/infiniband/core/core_priv.h index 2ad276cd9781..cf5a50cefa39 100644 --- a/drivers/infiniband/core/core_priv.h +++ b/drivers/infiniband/core/core_priv.h @@ -363,8 +363,10 @@ static inline struct ib_qp *_ib_create_qp(struct ib_device *dev, if ((qp_type < IB_QPT_MAX && !is_xrc) || qp_type == IB_QPT_DRIVER) { if (uobj) rdma_restrack_uadd(&qp->res); - else - rdma_restrack_kadd(&qp->res); + else { + rdma_restrack_set_task(&qp->res, pd->res.kern_name); + rdma_restrack_add(&qp->res); + } } else qp->res.valid = false; |