]> www.infradead.org Git - users/jedix/linux-maple.git/commit
io_uring/rsrc: pass 'struct io_ring_ctx' reference to rsrc helpers
authorMing Lei <ming.lei@redhat.com>
Thu, 7 Nov 2024 11:01:34 +0000 (19:01 +0800)
committerJens Axboe <axboe@kernel.dk>
Thu, 7 Nov 2024 22:24:33 +0000 (15:24 -0700)
commit0d98c509086837a8cf5a32f82f2a58f39a539192
treeea2fcd6c406d92ff8479964fc3b29c399e32f006
parentaf0a2ffef0e6d23412dd55df29f5caef8f3583f2
io_uring/rsrc: pass 'struct io_ring_ctx' reference to rsrc helpers

`io_rsrc_node` instance won't be shared among different io_uring ctxs,
and its allocation 'ctx' is always same with the user's 'ctx', so it is
safe to pass user 'ctx' reference to rsrc helpers. Even in io_clone_buffers(),
`io_rsrc_node` instance is allocated actually for destination io_uring_ctx.

Then io_rsrc_node_ctx() can be removed, and the 8 bytes `ctx` pointer will be
removed from `io_rsrc_node` in the following patch.

Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20241107110149.890530-2-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/filetable.c
io_uring/filetable.h
io_uring/rsrc.c
io_uring/rsrc.h
io_uring/splice.c