]> git.baikalelectronics.ru Git - kernel.git/commit
af_unix: Refactor unix_read_skb()
authorPeilin Ye <peilin.ye@bytedance.com>
Fri, 23 Sep 2022 04:59:26 +0000 (21:59 -0700)
committerJakub Kicinski <kuba@kernel.org>
Mon, 26 Sep 2022 18:00:19 +0000 (11:00 -0700)
commit82a3debb0127fc7cfa8b12605fbc31ef02589dc1
tree23495da3c7a515913fd0cb686843b1ee13aa018b
parent7fc88b4e05aa60cb3d497d3680109a08b3309fb9
af_unix: Refactor unix_read_skb()

Similar to udp_read_skb(), delete the unnecessary while loop in
unix_read_skb() for readability.  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/7009141683ad6cd3785daced3e4a80ba0eb773b5.1663909008.git.peilin.ye@bytedance.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/unix/af_unix.c