Commit dbf9227b authored by Hal Rosenstock's avatar Hal Rosenstock Committed by Linus Torvalds

[PATCH] IB: Simplify calling of list_del in MAD

Simplify calling of list_del.
Signed-off-by: default avatarSean Hefty <sean.hefty@intel.com>
Signed-off-by: default avatarHal Rosenstock <halr@voltaire.com>
Cc: Roland Dreier <rolandd@cisco.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent f75b7a52
...@@ -2188,7 +2188,6 @@ static int retry_send(struct ib_mad_send_wr_private *mad_send_wr) ...@@ -2188,7 +2188,6 @@ static int retry_send(struct ib_mad_send_wr_private *mad_send_wr)
if (!ret) { if (!ret) {
mad_send_wr->refcount++; mad_send_wr->refcount++;
list_del(&mad_send_wr->agent_list);
list_add_tail(&mad_send_wr->agent_list, list_add_tail(&mad_send_wr->agent_list,
&mad_send_wr->mad_agent_priv->send_list); &mad_send_wr->mad_agent_priv->send_list);
} }
...@@ -2223,10 +2222,10 @@ static void timeout_sends(void *data) ...@@ -2223,10 +2222,10 @@ static void timeout_sends(void *data)
break; break;
} }
list_del(&mad_send_wr->agent_list);
if (!retry_send(mad_send_wr)) if (!retry_send(mad_send_wr))
continue; continue;
list_del(&mad_send_wr->agent_list);
spin_unlock_irqrestore(&mad_agent_priv->lock, flags); spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
mad_send_wc.wr_id = mad_send_wr->wr_id; mad_send_wc.wr_id = mad_send_wr->wr_id;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment