diff options
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r-- | net/ipv4/tcp_input.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 8de2f1071c2b..53a8a5399f1e 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -2802,7 +2802,7 @@ static void tcp_sack_remove(struct tcp_sock *tp) | |||
2802 | int this_sack; | 2802 | int this_sack; |
2803 | 2803 | ||
2804 | /* Empty ofo queue, hence, all the SACKs are eaten. Clear. */ | 2804 | /* Empty ofo queue, hence, all the SACKs are eaten. Clear. */ |
2805 | if (skb_queue_len(&tp->out_of_order_queue) == 0) { | 2805 | if (skb_queue_empty(&tp->out_of_order_queue)) { |
2806 | tp->rx_opt.num_sacks = 0; | 2806 | tp->rx_opt.num_sacks = 0; |
2807 | tp->rx_opt.eff_sacks = tp->rx_opt.dsack; | 2807 | tp->rx_opt.eff_sacks = tp->rx_opt.dsack; |
2808 | return; | 2808 | return; |
@@ -2935,13 +2935,13 @@ queue_and_out: | |||
2935 | if(th->fin) | 2935 | if(th->fin) |
2936 | tcp_fin(skb, sk, th); | 2936 | tcp_fin(skb, sk, th); |
2937 | 2937 | ||
2938 | if (skb_queue_len(&tp->out_of_order_queue)) { | 2938 | if (!skb_queue_empty(&tp->out_of_order_queue)) { |
2939 | tcp_ofo_queue(sk); | 2939 | tcp_ofo_queue(sk); |
2940 | 2940 | ||
2941 | /* RFC2581. 4.2. SHOULD send immediate ACK, when | 2941 | /* RFC2581. 4.2. SHOULD send immediate ACK, when |
2942 | * gap in queue is filled. | 2942 | * gap in queue is filled. |
2943 | */ | 2943 | */ |
2944 | if (!skb_queue_len(&tp->out_of_order_queue)) | 2944 | if (skb_queue_empty(&tp->out_of_order_queue)) |
2945 | tp->ack.pingpong = 0; | 2945 | tp->ack.pingpong = 0; |
2946 | } | 2946 | } |
2947 | 2947 | ||
@@ -3249,9 +3249,8 @@ static int tcp_prune_queue(struct sock *sk) | |||
3249 | * This must not ever occur. */ | 3249 | * This must not ever occur. */ |
3250 | 3250 | ||
3251 | /* First, purge the out_of_order queue. */ | 3251 | /* First, purge the out_of_order queue. */ |
3252 | if (skb_queue_len(&tp->out_of_order_queue)) { | 3252 | if (!skb_queue_empty(&tp->out_of_order_queue)) { |
3253 | NET_ADD_STATS_BH(LINUX_MIB_OFOPRUNED, | 3253 | NET_INC_STATS_BH(LINUX_MIB_OFOPRUNED); |
3254 | skb_queue_len(&tp->out_of_order_queue)); | ||
3255 | __skb_queue_purge(&tp->out_of_order_queue); | 3254 | __skb_queue_purge(&tp->out_of_order_queue); |
3256 | 3255 | ||
3257 | /* Reset SACK state. A conforming SACK implementation will | 3256 | /* Reset SACK state. A conforming SACK implementation will |