]> Pileus Git - ~andy/linux/blobdiff - net/ipv4/ip_output.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs...
[~andy/linux] / net / ipv4 / ip_output.c
index 5516825a0751e7e9b6e0ede5ff3b19f809a8ff2e..8ebe86dd72af159e2250bc315251cf61561cc38a 100644 (file)
@@ -1284,7 +1284,12 @@ int ip_push_pending_frames(struct sock *sk)
 
        skb->priority = sk->sk_priority;
        skb->mark = sk->sk_mark;
-       skb->dst = dst_clone(&rt->u.dst);
+       /*
+        * Steal rt from cork.dst to avoid a pair of atomic_inc/atomic_dec
+        * on dst refcount
+        */
+       inet->cork.dst = NULL;
+       skb->dst = &rt->u.dst;
 
        if (iph->protocol == IPPROTO_ICMP)
                icmp_out_count(net, ((struct icmphdr *)