Simplify calling of list_del.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Hal Rosenstock <halr@voltaire.com>
Cc: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
if (!ret) {
mad_send_wr->refcount++;
- list_del(&mad_send_wr->agent_list);
list_add_tail(&mad_send_wr->agent_list,
&mad_send_wr->mad_agent_priv->send_list);
}
break;
}
+ list_del(&mad_send_wr->agent_list);
if (!retry_send(mad_send_wr))
continue;
- list_del(&mad_send_wr->agent_list);
spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
mad_send_wc.wr_id = mad_send_wr->wr_id;