]> err.no Git - linux-2.6/commitdiff
[PATCH] IB: Simplify calling of list_del in MAD
authorHal Rosenstock <halr@voltaire.com>
Wed, 27 Jul 2005 18:45:30 +0000 (11:45 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 27 Jul 2005 23:26:11 +0000 (16:26 -0700)
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>
drivers/infiniband/core/mad.c

index 04f88d337388252b109bb913a1a3c56d69625b2c..e96ca278c90e85be6af6e714c9d587bd188c84d3 100644 (file)
@@ -2188,7 +2188,6 @@ static int retry_send(struct ib_mad_send_wr_private *mad_send_wr)
 
        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);
        }
@@ -2223,10 +2222,10 @@ static void timeout_sends(void *data)
                        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;