diff --git a/[refs] b/[refs] index fe1df88f288f..6d0cec425e08 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ff4b950277b6534caab2b2b956dba6ce29757551 +refs/heads/master: f945fa7ad9c12a3356a3de7fb2143ccc2f2c3bca diff --git a/trunk/net/ipv4/ip_output.c b/trunk/net/ipv4/ip_output.c index 480469b92aa7..bc9e57550e86 100644 --- a/trunk/net/ipv4/ip_output.c +++ b/trunk/net/ipv4/ip_output.c @@ -1016,8 +1016,6 @@ int ip_append_data(struct sock *sk, skb_fill_page_desc(skb, i, page, 0, 0); frag = &skb_shinfo(skb)->frags[i]; - skb->truesize += PAGE_SIZE; - atomic_add(PAGE_SIZE, &sk->sk_wmem_alloc); } else { err = -EMSGSIZE; goto error; @@ -1030,6 +1028,8 @@ int ip_append_data(struct sock *sk, frag->size += copy; skb->len += copy; skb->data_len += copy; + skb->truesize += copy; + atomic_add(copy, &sk->sk_wmem_alloc); } offset += copy; length -= copy; diff --git a/trunk/net/ipv6/ip6_output.c b/trunk/net/ipv6/ip6_output.c index 6338a9c1aa14..3bef30e4a23d 100644 --- a/trunk/net/ipv6/ip6_output.c +++ b/trunk/net/ipv6/ip6_output.c @@ -1316,8 +1316,6 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, skb_fill_page_desc(skb, i, page, 0, 0); frag = &skb_shinfo(skb)->frags[i]; - skb->truesize += PAGE_SIZE; - atomic_add(PAGE_SIZE, &sk->sk_wmem_alloc); } else { err = -EMSGSIZE; goto error; @@ -1330,6 +1328,8 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, frag->size += copy; skb->len += copy; skb->data_len += copy; + skb->truesize += copy; + atomic_add(copy, &sk->sk_wmem_alloc); } offset += copy; length -= copy;