mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
tcp: cleanup tcp_remove_empty_skb() use
All tcp_remove_empty_skb() callers now use tcp_write_queue_tail() for the skb argument, we can therefore factorize code. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
3ded97bc41
commit
27728ba80f
@@ -1291,7 +1291,7 @@ alloc_skb:
|
||||
u64 snd_una = READ_ONCE(msk->snd_una);
|
||||
|
||||
if (snd_una != msk->snd_nxt) {
|
||||
tcp_remove_empty_skb(ssk, tcp_write_queue_tail(ssk));
|
||||
tcp_remove_empty_skb(ssk);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1307,7 +1307,7 @@ alloc_skb:
|
||||
|
||||
copy = min_t(size_t, copy, info->limit - info->sent);
|
||||
if (!sk_wmem_schedule(ssk, copy)) {
|
||||
tcp_remove_empty_skb(ssk, tcp_write_queue_tail(ssk));
|
||||
tcp_remove_empty_skb(ssk);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user