diff options
Diffstat (limited to 'net/sctp/transport.c')
-rw-r--r-- | net/sctp/transport.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/net/sctp/transport.c b/net/sctp/transport.c index ca5331cc1ed2..fafd2a461ba0 100644 --- a/net/sctp/transport.c +++ b/net/sctp/transport.c | |||
@@ -151,13 +151,11 @@ void sctp_transport_free(struct sctp_transport *transport) | |||
151 | * structure hang around in memory since we know | 151 | * structure hang around in memory since we know |
152 | * the tranport is going away. | 152 | * the tranport is going away. |
153 | */ | 153 | */ |
154 | if (timer_pending(&transport->T3_rtx_timer) && | 154 | if (del_timer(&transport->T3_rtx_timer)) |
155 | del_timer(&transport->T3_rtx_timer)) | ||
156 | sctp_transport_put(transport); | 155 | sctp_transport_put(transport); |
157 | 156 | ||
158 | /* Delete the ICMP proto unreachable timer if it's active. */ | 157 | /* Delete the ICMP proto unreachable timer if it's active. */ |
159 | if (timer_pending(&transport->proto_unreach_timer) && | 158 | if (del_timer(&transport->proto_unreach_timer)) |
160 | del_timer(&transport->proto_unreach_timer)) | ||
161 | sctp_association_put(transport->asoc); | 159 | sctp_association_put(transport->asoc); |
162 | 160 | ||
163 | sctp_transport_put(transport); | 161 | sctp_transport_put(transport); |
@@ -655,10 +653,9 @@ void sctp_transport_reset(struct sctp_transport *t) | |||
655 | void sctp_transport_immediate_rtx(struct sctp_transport *t) | 653 | void sctp_transport_immediate_rtx(struct sctp_transport *t) |
656 | { | 654 | { |
657 | /* Stop pending T3_rtx_timer */ | 655 | /* Stop pending T3_rtx_timer */ |
658 | if (timer_pending(&t->T3_rtx_timer)) { | 656 | if (del_timer(&t->T3_rtx_timer)) |
659 | (void)del_timer(&t->T3_rtx_timer); | ||
660 | sctp_transport_put(t); | 657 | sctp_transport_put(t); |
661 | } | 658 | |
662 | sctp_retransmit(&t->asoc->outqueue, t, SCTP_RTXR_T3_RTX); | 659 | sctp_retransmit(&t->asoc->outqueue, t, SCTP_RTXR_T3_RTX); |
663 | if (!timer_pending(&t->T3_rtx_timer)) { | 660 | if (!timer_pending(&t->T3_rtx_timer)) { |
664 | if (!mod_timer(&t->T3_rtx_timer, jiffies + t->rto)) | 661 | if (!mod_timer(&t->T3_rtx_timer, jiffies + t->rto)) |