]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit97be3215f8668e49b0af91c81eb1dde77a6e373b
tree8f75ac52167355b8b5511ace9f176fca14d64d7e
parent2222d813fd036aa76d30a7b76978bf5bfa9ae325
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