diff options
-rw-r--r-- | drivers/infiniband/core/mad.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c index ba54c856b0e5..3a702da83e41 100644 --- a/drivers/infiniband/core/mad.c +++ b/drivers/infiniband/core/mad.c | |||
@@ -2311,6 +2311,7 @@ static void local_completions(void *data) | |||
2311 | local = list_entry(mad_agent_priv->local_list.next, | 2311 | local = list_entry(mad_agent_priv->local_list.next, |
2312 | struct ib_mad_local_private, | 2312 | struct ib_mad_local_private, |
2313 | completion_list); | 2313 | completion_list); |
2314 | list_del(&local->completion_list); | ||
2314 | spin_unlock_irqrestore(&mad_agent_priv->lock, flags); | 2315 | spin_unlock_irqrestore(&mad_agent_priv->lock, flags); |
2315 | if (local->mad_priv) { | 2316 | if (local->mad_priv) { |
2316 | recv_mad_agent = local->recv_mad_agent; | 2317 | recv_mad_agent = local->recv_mad_agent; |
@@ -2362,7 +2363,6 @@ local_send_completion: | |||
2362 | &mad_send_wc); | 2363 | &mad_send_wc); |
2363 | 2364 | ||
2364 | spin_lock_irqsave(&mad_agent_priv->lock, flags); | 2365 | spin_lock_irqsave(&mad_agent_priv->lock, flags); |
2365 | list_del(&local->completion_list); | ||
2366 | atomic_dec(&mad_agent_priv->refcount); | 2366 | atomic_dec(&mad_agent_priv->refcount); |
2367 | if (!recv) | 2367 | if (!recv) |
2368 | kmem_cache_free(ib_mad_cache, local->mad_priv); | 2368 | kmem_cache_free(ib_mad_cache, local->mad_priv); |