udp: Refactor udp_read_skb()
authorPeilin Ye <peilin.ye@bytedance.com>
Fri, 23 Sep 2022 04:59:13 +0000 (21:59 -0700)
committerJakub Kicinski <kuba@kernel.org>
Mon, 26 Sep 2022 18:00:19 +0000 (11:00 -0700)
commit31f1fbcb346c9342f6860c322b3f33b2acbc640b
treea41df2706cf3b9ca01888b07d6b9fd63ba8f6944
parentc52add61c27ea23501be82a34854edd98e10e061
udp: Refactor udp_read_skb()

Delete the unnecessary while loop in udp_read_skb() for readability.
Additionally, since recv_actor() cannot return a value greater than
skb->len (see sk_psock_verdict_recv()), remove the redundant check.

Suggested-by: Cong Wang <cong.wang@bytedance.com>
Signed-off-by: Peilin Ye <peilin.ye@bytedance.com>
Link: https://lore.kernel.org/r/343b5d8090a3eb764068e9f1d392939e2b423747.1663909008.git.peilin.ye@bytedance.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/udp.c