aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/ip_output.c4
-rw-r--r--net/ipv6/ip6_output.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 480469b92aa7..bc9e57550e86 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -1016,8 +1016,6 @@ alloc_new_skb:
1016 1016
1017 skb_fill_page_desc(skb, i, page, 0, 0); 1017 skb_fill_page_desc(skb, i, page, 0, 0);
1018 frag = &skb_shinfo(skb)->frags[i]; 1018 frag = &skb_shinfo(skb)->frags[i];
1019 skb->truesize += PAGE_SIZE;
1020 atomic_add(PAGE_SIZE, &sk->sk_wmem_alloc);
1021 } else { 1019 } else {
1022 err = -EMSGSIZE; 1020 err = -EMSGSIZE;
1023 goto error; 1021 goto error;
@@ -1030,6 +1028,8 @@ alloc_new_skb:
1030 frag->size += copy; 1028 frag->size += copy;
1031 skb->len += copy; 1029 skb->len += copy;
1032 skb->data_len += copy; 1030 skb->data_len += copy;
1031 skb->truesize += copy;
1032 atomic_add(copy, &sk->sk_wmem_alloc);
1033 } 1033 }
1034 offset += copy; 1034 offset += copy;
1035 length -= copy; 1035 length -= copy;
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 6338a9c1aa14..3bef30e4a23d 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -1316,8 +1316,6 @@ alloc_new_skb:
1316 1316
1317 skb_fill_page_desc(skb, i, page, 0, 0); 1317 skb_fill_page_desc(skb, i, page, 0, 0);
1318 frag = &skb_shinfo(skb)->frags[i]; 1318 frag = &skb_shinfo(skb)->frags[i];
1319 skb->truesize += PAGE_SIZE;
1320 atomic_add(PAGE_SIZE, &sk->sk_wmem_alloc);
1321 } else { 1319 } else {
1322 err = -EMSGSIZE; 1320 err = -EMSGSIZE;
1323 goto error; 1321 goto error;
@@ -1330,6 +1328,8 @@ alloc_new_skb:
1330 frag->size += copy; 1328 frag->size += copy;
1331 skb->len += copy; 1329 skb->len += copy;
1332 skb->data_len += copy; 1330 skb->data_len += copy;
1331 skb->truesize += copy;
1332 atomic_add(copy, &sk->sk_wmem_alloc);
1333 } 1333 }
1334 offset += copy; 1334 offset += copy;
1335 length -= copy; 1335 length -= copy;