tcp: delete redundant calls of tcp_mtup_init()
authorPeter Pan(潘卫平) <panweiping3@gmail.com>
Sun, 19 Jan 2014 12:44:46 +0000 (20:44 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 22 Jan 2014 00:52:31 +0000 (16:52 -0800)
As tcp_rcv_state_process() has already calls tcp_mtup_init() for non-fastopen
sock, we can delete the redundant calls of tcp_mtup_init() in
tcp_{v4,v6}_syn_recv_sock().

Signed-off-by: Weiping Pan <panweiping3@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_ipv4.c
net/ipv6/tcp_ipv6.c

index 7297b56c28c7a150b8b89f536698e16b7aaba084..3cf9765104978cbf8ed49d184f926f23130cd4fd 100644 (file)
@@ -1668,7 +1668,6 @@ struct sock *tcp_v4_syn_recv_sock(struct sock *sk, struct sk_buff *skb,
        }
        sk_setup_caps(newsk, dst);
 
-       tcp_mtup_init(newsk);
        tcp_sync_mss(newsk, dst_mtu(dst));
        newtp->advmss = dst_metric_advmss(dst);
        if (tcp_sk(sk)->rx_opt.user_mss &&
index b61fa8bac3bdbb99f283a5483e17b8137f54276f..889079b2ea852f237dea495cc66a63c968037b6d 100644 (file)
@@ -1246,7 +1246,6 @@ static struct sock *tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb,
                inet_csk(newsk)->icsk_ext_hdr_len = (newnp->opt->opt_nflen +
                                                     newnp->opt->opt_flen);
 
-       tcp_mtup_init(newsk);
        tcp_sync_mss(newsk, dst_mtu(dst));
        newtp->advmss = dst_metric_advmss(dst);
        if (tcp_sk(sk)->rx_opt.user_mss &&