net: add __sys_socket_file()
authorJens Axboe <axboe@kernel.dk>
Tue, 12 Apr 2022 20:22:39 +0000 (14:22 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 25 Apr 2022 00:19:21 +0000 (18:19 -0600)
commitda214a475f8bd1d3e9e7a19ddfeb4d1617551bab
tree8f75ac52167355b8b5511ace9f176fca14d64d7e
parent0200ce6a57c5de802f4e438485c14cc9d63d5f4b
net: add __sys_socket_file()

This works like __sys_socket(), except instead of allocating and
returning a socket fd, it just returns the file associated with the
socket. No fd is installed into the process file table.

This is similar to do_accept(), and allows io_uring to use this without
instantiating a file descriptor in the process file table.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Acked-by: David S. Miller <davem@davemloft.net>
Link: https://lore.kernel.org/r/20220412202240.234207-2-axboe@kernel.dk
include/linux/socket.h
net/socket.c