Skip to content

Commit f4d0166

Browse files
edumazetdavem330
authored andcommitted
tcp: remove unnecessary skb_reset_tail_pointer()
__pskb_trim_head() does not need to reset skb tail pointer. Also change the comments, __pskb_pull_head() does not exist. Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 80b7d81 commit f4d0166

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

net/ipv4/tcp_output.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1328,9 +1328,8 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len,
13281328
return 0;
13291329
}
13301330

1331-
/* This is similar to __pskb_pull_head() (it will go to core/skbuff.c
1332-
* eventually). The difference is that pulled data not copied, but
1333-
* immediately discarded.
1331+
/* This is similar to __pskb_pull_tail(). The difference is that pulled
1332+
* data is not copied, but immediately discarded.
13341333
*/
13351334
static int __pskb_trim_head(struct sk_buff *skb, int len)
13361335
{
@@ -1365,7 +1364,6 @@ static int __pskb_trim_head(struct sk_buff *skb, int len)
13651364
}
13661365
shinfo->nr_frags = k;
13671366

1368-
skb_reset_tail_pointer(skb);
13691367
skb->data_len -= len;
13701368
skb->len = skb->data_len;
13711369
return len;

0 commit comments

Comments
 (0)