]> Git Repo - linux.git/blobdiff - include/net/tcp.h
ALSA: pcm: introduce INFO_NO_REWINDS flag
[linux.git] / include / net / tcp.h
index 70972f3ac8fa391e0d747c878cf9fd8a7a0cedff..4da22b41bde688dec4a3741f510346dae0cf32e0 100644 (file)
@@ -293,7 +293,10 @@ static inline bool tcp_out_of_memory(struct sock *sk)
 static inline void tcp_wmem_free_skb(struct sock *sk, struct sk_buff *skb)
 {
        sk_wmem_queued_add(sk, -skb->truesize);
-       sk_mem_uncharge(sk, skb->truesize);
+       if (!skb_zcopy_pure(skb))
+               sk_mem_uncharge(sk, skb->truesize);
+       else
+               sk_mem_uncharge(sk, SKB_TRUESIZE(skb_end_offset(skb)));
        __kfree_skb(skb);
 }
 
@@ -974,7 +977,8 @@ static inline bool tcp_skb_can_collapse(const struct sk_buff *to,
                                        const struct sk_buff *from)
 {
        return likely(tcp_skb_can_collapse_to(to) &&
-                     mptcp_skb_can_collapse(to, from));
+                     mptcp_skb_can_collapse(to, from) &&
+                     skb_pure_zcopy_same(to, from));
 }
 
 /* Events passed to congestion control interface */
This page took 0.037594 seconds and 4 git commands to generate.