net: add accept helper not installing fd
authorPavel Begunkov <asml.silence@gmail.com>
Wed, 25 Aug 2021 11:25:44 +0000 (12:25 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 25 Aug 2021 12:36:56 +0000 (06:36 -0600)
commitd32f89da7fa8ccc8b3fb8f909d61e42b9bc39329
treefbdb642ca406337a0fecd472c2d14ab2bcb64355
parentdadebc350da2bef62593b1df007a6e0b90baf42a
net: add accept helper not installing fd

Introduce and reuse a helper that acts similarly to __sys_accept4_file()
but returns struct file instead of installing file descriptor. Will be
used by io_uring.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Acked-by: David S. Miller <davem@davemloft.net>
Link: https://lore.kernel.org/r/c57b9e8e818d93683a3d24f8ca50ca038d1da8c4.1629888991.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/socket.h
net/socket.c