summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@mellanox.com>2020-05-06 10:46:59 +0300
committerJason Gunthorpe <jgg@mellanox.com>2020-05-12 21:32:54 -0300
commit1cc44279f2973b413bae69d9a0bf01f051f382b0 (patch)
tree1d28676fa969e78d4ddbe24900bb25fb62086cb7 /drivers/infiniband
parentcfa68b0d04401b3ae733787b1c72ab1266e852ab (diff)
downloadlinux-1cc44279f2973b413bae69d9a0bf01f051f382b0.tar.gz
linux-1cc44279f2973b413bae69d9a0bf01f051f382b0.tar.bz2
linux-1cc44279f2973b413bae69d9a0bf01f051f382b0.zip
RDMA/cm: Remove the cm_free_id() wrapper function
Just call xa_erase directly during cm_destroy_id() Link: https://lore.kernel.org/r/20200506074701.9775-9-leon@kernel.org Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/core/cm.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c
index 4f77ca2ba8fc..320fe89af5cb 100644
--- a/drivers/infiniband/core/cm.c
+++ b/drivers/infiniband/core/cm.c
@@ -580,11 +580,6 @@ static u32 cm_local_id(__be32 local_id)
return (__force u32) (local_id ^ cm.random_id_operand);
}
-static void cm_free_id(__be32 local_id)
-{
- xa_erase_irq(&cm.local_id_table, cm_local_id(local_id));
-}
-
static struct cm_id_private *cm_acquire_id(__be32 local_id, __be32 remote_id)
{
struct cm_id_private *cm_id_priv;
@@ -1136,7 +1131,7 @@ retest:
case IB_CM_TIMEWAIT:
/*
* The cm_acquire_id in cm_timewait_handler will stop working
- * once we do cm_free_id() below, so just move to idle here for
+ * once we do xa_erase below, so just move to idle here for
* consistency.
*/
cm_id->state = IB_CM_IDLE;
@@ -1166,7 +1161,7 @@ retest:
spin_unlock(&cm.lock);
spin_unlock_irq(&cm_id_priv->lock);
- cm_free_id(cm_id->local_id);
+ xa_erase_irq(&cm.local_id_table, cm_local_id(cm_id->local_id));
cm_deref_id(cm_id_priv);
wait_for_completion(&cm_id_priv->comp);
while ((work = cm_dequeue_work(cm_id_priv)) != NULL)