]> www.infradead.org Git - linux.git/commit
io_uring/net: move charging socket out of zc io_uring
authorPavel Begunkov <asml.silence@gmail.com>
Thu, 27 Jun 2024 12:59:44 +0000 (13:59 +0100)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 2 Jul 2024 10:06:50 +0000 (12:06 +0200)
commit060f4ba6e40338a70932603a3564903acf5f5734
tree49961bfad8963995619d8d271cf3ace69d6b2f49
parentaeb320fc05c74e1d3b429aa0e3a777b8a931c189
io_uring/net: move charging socket out of zc io_uring

Currently, io_uring's io_sg_from_iter() duplicates the part of
__zerocopy_sg_from_iter() charging pages to the socket. It'd be too easy
to miss while changing it in net/, the chunk is not the most
straightforward for outside users and full of internal implementation
details. io_uring is not a good place to keep it, deduplicate it by
moving out of the callback into __zerocopy_sg_from_iter().

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Reviewed-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
include/linux/skbuff.h
include/linux/socket.h
io_uring/net.c
net/core/datagram.c