mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
net: remove redundant check for timer pending state before del_timer
As in del_timer() there has already placed a timer_pending() function to check whether the timer to be deleted is pending or not, it's unnecessary to check timer pending state again before del_timer() is called. Signed-off-by: Ying Xue <ying.xue@windriver.com> Cc: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
2b3c9a850c
commit
25cc4ae913
11 changed files with 21 additions and 38 deletions
|
@ -1700,10 +1700,8 @@ static void sctp_check_transmitted(struct sctp_outq *q,
|
|||
* address.
|
||||
*/
|
||||
if (!transport->flight_size) {
|
||||
if (timer_pending(&transport->T3_rtx_timer) &&
|
||||
del_timer(&transport->T3_rtx_timer)) {
|
||||
if (del_timer(&transport->T3_rtx_timer))
|
||||
sctp_transport_put(transport);
|
||||
}
|
||||
} else if (restart_timer) {
|
||||
if (!mod_timer(&transport->T3_rtx_timer,
|
||||
jiffies + transport->rto))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue