]> git.ipfire.org Git - thirdparty/linux.git/commit
io_uring: pass struct io_tw_state by value
authorCaleb Sander Mateos <csander@purestorage.com>
Mon, 17 Feb 2025 02:25:05 +0000 (19:25 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 17 Feb 2025 12:34:50 +0000 (05:34 -0700)
commit94a4274bb6ebc5b4293559304d0f00928de0d8c0
treed1c357565cfff75155063cb82401439b5fd3c906
parentbcf8a0293a019bb0c4aebafdebe9a1e7a923249a
io_uring: pass struct io_tw_state by value

8e5b3b89ecaf ("io_uring: remove struct io_tw_state::locked") removed the
only field of io_tw_state but kept it as a task work callback argument
to "forc[e] users not to invoke them carelessly out of a wrong context".
Passing the struct io_tw_state * argument adds a few instructions to all
callers that can't inline the functions and see the argument is unused.

So pass struct io_tw_state by value instead. Since it's a 0-sized value,
it can be passed without any instructions needed to initialize it.

Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
Link: https://lore.kernel.org/r/20250217022511.1150145-2-csander@purestorage.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/io_uring_types.h
io_uring/io_uring.c