diff options
author | Bob Pearson <rpearsonhpe@gmail.com> | 2021-01-26 00:16:37 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2021-01-28 22:29:55 +0300 |
commit | 88cc77eb8bd05fd185a7d142dedc6e406c5c35b6 (patch) | |
tree | b4a5479b2cf19a1a2f32054ade10c4fbb377fadd /drivers/infiniband/sw/rxe/rxe_mcast.c | |
parent | c4369575b2bc2993edf8223a8f5c9f510ee629d0 (diff) | |
download | linux-88cc77eb8bd05fd185a7d142dedc6e406c5c35b6.tar.xz |
RDMA/rxe: Fix misleading comments and names
The names and comments of the 'unlocked' pool APIs are very misleading and
not what was intended. This patch replaces 'rxe_xxx_nl' with
'rxe_xxx_locked' with comments indicating that the caller is expected to
hold the rxe pool lock.
Link: https://lore.kernel.org/r/20210125211641.2694-3-rpearson@hpe.com
Reported-by: Hillf Danton <hdanton@sina.com>
Suggested-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Bob Pearson <rpearson@hpe.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/sw/rxe/rxe_mcast.c')
-rw-r--r-- | drivers/infiniband/sw/rxe/rxe_mcast.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/infiniband/sw/rxe/rxe_mcast.c b/drivers/infiniband/sw/rxe/rxe_mcast.c index 5be47ce7d319..0ea9a5aa4ec0 100644 --- a/drivers/infiniband/sw/rxe/rxe_mcast.c +++ b/drivers/infiniband/sw/rxe/rxe_mcast.c @@ -15,18 +15,18 @@ static struct rxe_mc_grp *create_grp(struct rxe_dev *rxe, int err; struct rxe_mc_grp *grp; - grp = rxe_alloc_nl(&rxe->mc_grp_pool); + grp = rxe_alloc_locked(&rxe->mc_grp_pool); if (!grp) return ERR_PTR(-ENOMEM); INIT_LIST_HEAD(&grp->qp_list); spin_lock_init(&grp->mcg_lock); grp->rxe = rxe; - rxe_add_key_nl(grp, mgid); + rxe_add_key_locked(grp, mgid); err = rxe_mcast_add(rxe, mgid); if (unlikely(err)) { - rxe_drop_key_nl(grp); + rxe_drop_key_locked(grp); rxe_drop_ref(grp); return ERR_PTR(err); } @@ -47,7 +47,7 @@ int rxe_mcast_get_grp(struct rxe_dev *rxe, union ib_gid *mgid, write_lock_irqsave(&pool->pool_lock, flags); - grp = rxe_pool_get_key_nl(pool, mgid); + grp = rxe_pool_get_key_locked(pool, mgid); if (grp) goto done; |