aboutsummaryrefslogtreecommitdiff
path: root/drivers/infiniband/core
diff options
context:
space:
mode:
authorKrishna Kumar <krkumar2@in.ibm.com>2006-09-29 12:03:35 -0700
committerRoland Dreier <rolandd@cisco.com>2006-10-02 14:52:16 -0700
commit94de178ac636e9d6f89b11cb3dd400b777942ac9 (patch)
tree3a049741600aa5c1387ca732606b0198d815547d /drivers/infiniband/core
parent8f0472d331619d5d74927978d0dde5b4935e41a5 (diff)
RDMA/cma: Eliminate unnecessary remove_list
Eliminate remove_list by using list_del_init() instead during device removal handling. Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com> Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/core')
-rw-r--r--drivers/infiniband/core/cma.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index d10fdf1419b..3982b81d33c 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -2151,12 +2151,9 @@ static int cma_remove_id_dev(struct rdma_id_private *id_priv)
static void cma_process_remove(struct cma_device *cma_dev)
{
- struct list_head remove_list;
struct rdma_id_private *id_priv;
int ret;
- INIT_LIST_HEAD(&remove_list);
-
mutex_lock(&lock);
while (!list_empty(&cma_dev->id_list)) {
id_priv = list_entry(cma_dev->id_list.next,
@@ -2167,8 +2164,7 @@ static void cma_process_remove(struct cma_device *cma_dev)
continue;
}
- list_del(&id_priv->list);
- list_add_tail(&id_priv->list, &remove_list);
+ list_del_init(&id_priv->list);
atomic_inc(&id_priv->refcount);
mutex_unlock(&lock);