diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2022-02-06 08:28:34 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2022-02-06 08:28:34 -0300 |
commit | 9334030c3b94ca32af2e5afd02cb1c63307a2bea (patch) | |
tree | 51bd44f141decad700255a716a6b6924d7e2faf4 /net/ipv4/tcp.c | |
parent | fc45e6588d57b65378612fce07089276141509dc (diff) | |
parent | 90c9e950c0def5c354b4a6154a2ddda3e5f214ac (diff) | |
download | linux-9334030c3b94ca32af2e5afd02cb1c63307a2bea.tar.gz linux-9334030c3b94ca32af2e5afd02cb1c63307a2bea.tar.bz2 linux-9334030c3b94ca32af2e5afd02cb1c63307a2bea.zip |
Merge remote-tracking branch 'torvalds/master' into perf/urgent
To check if more kernel API sync is needed and also to see if the perf
build tests continue to pass.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r-- | net/ipv4/tcp.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 78e81465f5f3..bdf108f544a4 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -1322,10 +1322,13 @@ new_segment: /* skb changing from pure zc to mixed, must charge zc */ if (unlikely(skb_zcopy_pure(skb))) { - if (!sk_wmem_schedule(sk, skb->data_len)) + u32 extra = skb->truesize - + SKB_TRUESIZE(skb_end_offset(skb)); + + if (!sk_wmem_schedule(sk, extra)) goto wait_for_space; - sk_mem_charge(sk, skb->data_len); + sk_mem_charge(sk, extra); skb_shinfo(skb)->flags &= ~SKBFL_PURE_ZEROCOPY; } |