]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - net/ipv4/tcp_metrics.c
tcp: replace dst_confirm with sk_dst_confirm
[mirror_ubuntu-zesty-kernel.git] / net / ipv4 / tcp_metrics.c
index ba8f02d0f283c6eaaf14ed89103adea135093353..077d7b7ba403a77a1e7623ec3f8ac0e3699b80db 100644 (file)
@@ -375,12 +375,10 @@ void tcp_update_metrics(struct sock *sk)
        u32 val;
        int m;
 
+       sk_dst_confirm(sk);
        if (sysctl_tcp_nometrics_save || !dst)
                return;
 
-       if (dst->flags & DST_HOST)
-               dst_confirm(dst);
-
        rcu_read_lock();
        if (icsk->icsk_backoff || !tp->srtt_us) {
                /* This session failed to estimate rtt. Why?
@@ -493,11 +491,10 @@ void tcp_init_metrics(struct sock *sk)
        struct tcp_metrics_block *tm;
        u32 val, crtt = 0; /* cached RTT scaled by 8 */
 
+       sk_dst_confirm(sk);
        if (!dst)
                goto reset;
 
-       dst_confirm(dst);
-
        rcu_read_lock();
        tm = tcp_get_metrics(sk, dst, true);
        if (!tm) {