summaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2021-10-27 13:19:17 -0700
committerDavid S. Miller <davem@davemloft.net>2021-10-28 12:44:38 +0100
commit3ded97bc41a1e76e1e72eeb192331c01ceacc4bc (patch)
tree724f740d4ac0ec6f3c63a2efa23a650ef291cf26 /net/ipv4/tcp.c
parent911e3a46fb38669560021537e00222591231f456 (diff)
downloadlinux-3ded97bc41a1e76e1e72eeb192331c01ceacc4bc.tar.bz2
tcp: remove dead code from tcp_sendmsg_locked()
TCP sendmsg() no longer puts payload in skb head, we can remove dead code. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r--net/ipv4/tcp.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index d0b848ff5c0f..4053ace0cd76 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -1309,14 +1309,7 @@ new_segment:
if (copy > msg_data_left(msg))
copy = msg_data_left(msg);
- /* Where to copy to? */
- if (skb_availroom(skb) > 0 && !zc) {
- /* We have some space in skb head. Superb! */
- copy = min_t(int, copy, skb_availroom(skb));
- err = skb_add_data_nocache(sk, skb, &msg->msg_iter, copy);
- if (err)
- goto do_fault;
- } else if (!zc) {
+ if (!zc) {
bool merge = true;
int i = skb_shinfo(skb)->nr_frags;
struct page_frag *pfrag = sk_page_frag(sk);
@@ -1416,7 +1409,6 @@ out_nopush:
do_error:
skb = tcp_write_queue_tail(sk);
-do_fault:
tcp_remove_empty_skb(sk, skb);
if (copied + copied_syn)