mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
skb: Add skb_head_is_locked helper function
This patch adds support for a skb_head_is_locked helper function. It is meant to be used any time we are considering transferring the head from skb->head to a paged frag. If the head is locked it means we cannot remove the head from the skb so it must be copied or we must take the skb as a whole. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
715dc1f342
commit
3a7c1ee4ab
3 changed files with 16 additions and 3 deletions
|
@ -4568,7 +4568,7 @@ static bool tcp_try_coalesce(struct sock *sk,
|
|||
skb_shinfo(from)->nr_frags >= MAX_SKB_FRAGS)
|
||||
return false;
|
||||
|
||||
if (!from->head_frag || skb_cloned(from))
|
||||
if (skb_head_is_locked(from))
|
||||
return false;
|
||||
|
||||
delta = from->truesize - SKB_DATA_ALIGN(sizeof(struct sk_buff));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue