net/socket: Break down __sys_setsockopt
authorBreno Leitao <leitao@debian.org>
Mon, 16 Oct 2023 13:47:41 +0000 (06:47 -0700)
committerJens Axboe <axboe@kernel.dk>
Thu, 19 Oct 2023 20:05:49 +0000 (14:05 -0600)
commit1406245c29454ff84919736be83e14cdaba7fec1
treee2201c2cd13e781fc06824386b91193972b41140
parent3f31e0d14d44ad491a81b7c1f83f32fbc300a867
net/socket: Break down __sys_setsockopt

Split __sys_setsockopt() into two functions by removing the core
logic into a sub-function (do_sock_setsockopt()). This will avoid
code duplication when doing the same operation in other callers, for
instance.

do_sock_setsockopt() will be called by io_uring setsockopt() command
operation in the following patch.

Signed-off-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Acked-by: Martin KaFai Lau <martin.lau@kernel.org>
Link: https://lore.kernel.org/r/20231016134750.1381153-4-leitao@debian.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/net/sock.h
net/socket.c