summaryrefslogtreecommitdiff
path: root/net/ipv4
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2012-05-03 01:09:42 +0000
committerDavid S. Miller <davem@davemloft.net>2012-05-03 13:18:37 -0400
commit3a7c1ee4ab89f9250b8f82656a7be0ae14aa3691 (patch)
tree9dc10e067f2364fd3590b38cd5db495cd09c32e6 /net/ipv4
parent715dc1f342713816d1be1c37643a2c9e6ee181a7 (diff)
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>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/tcp_input.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 84e69e02fe20..7b2d351f24db 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -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));