Skip to content

Commit dbf9227

Browse files
Hal RosenstockLinus Torvalds
authored andcommitted
[PATCH] IB: Simplify calling of list_del in MAD
Simplify calling of list_del. Signed-off-by: Sean Hefty <[email protected]> Signed-off-by: Hal Rosenstock <[email protected]> Cc: Roland Dreier <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent f75b7a5 commit dbf9227

File tree

1 file changed

+1
-2
lines changed
  • drivers/infiniband/core

1 file changed

+1
-2
lines changed

drivers/infiniband/core/mad.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2188,7 +2188,6 @@ static int retry_send(struct ib_mad_send_wr_private *mad_send_wr)
21882188

21892189
if (!ret) {
21902190
mad_send_wr->refcount++;
2191-
list_del(&mad_send_wr->agent_list);
21922191
list_add_tail(&mad_send_wr->agent_list,
21932192
&mad_send_wr->mad_agent_priv->send_list);
21942193
}
@@ -2223,10 +2222,10 @@ static void timeout_sends(void *data)
22232222
break;
22242223
}
22252224

2225+
list_del(&mad_send_wr->agent_list);
22262226
if (!retry_send(mad_send_wr))
22272227
continue;
22282228

2229-
list_del(&mad_send_wr->agent_list);
22302229
spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
22312230

22322231
mad_send_wc.wr_id = mad_send_wr->wr_id;

0 commit comments

Comments
 (0)