]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
tcp: refactor tcp_read_skb() a bit
authorCong Wang <cong.wang@bytedance.com>
Wed, 17 Aug 2022 19:54:44 +0000 (12:54 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 18 Aug 2022 18:04:56 +0000 (11:04 -0700)
commita8688821f3854f37fe0198b8945f9cfc051ab2cf
tree3e166b8c8d792283d7f4ce6bbc2354591387f5d8
parentc457985aaa92e1fda2ce837cabf90bf687b92dcb
tcp: refactor tcp_read_skb() a bit

As tcp_read_skb() only reads one skb at a time, the while loop is
unnecessary, we can turn it into an if. This also simplifies the
code logic.

Cc: Eric Dumazet <edumazet@google.com>
Cc: John Fastabend <john.fastabend@gmail.com>
Cc: Jakub Sitnicki <jakub@cloudflare.com>
Signed-off-by: Cong Wang <cong.wang@bytedance.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/tcp.c