summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorCaleb Sander Mateos <csander@purestorage.com>2025-02-17 05:25:05 +0300
committerJens Axboe <axboe@kernel.dk>2025-02-17 15:34:50 +0300
commit94a4274bb6ebc5b4293559304d0f00928de0d8c0 (patch)
treed1c357565cfff75155063cb82401439b5fd3c906 /include/linux
parentbcf8a0293a019bb0c4aebafdebe9a1e7a923249a (diff)
downloadlinux-94a4274bb6ebc5b4293559304d0f00928de0d8c0.tar.xz
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>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/io_uring_types.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/io_uring_types.h b/include/linux/io_uring_types.h
index ea4694ee9d19..123e69368730 100644
--- a/include/linux/io_uring_types.h
+++ b/include/linux/io_uring_types.h
@@ -444,7 +444,7 @@ struct io_ring_ctx {
struct io_tw_state {
};
/* Alias to use in code that doesn't instantiate struct io_tw_state */
-typedef struct io_tw_state *io_tw_token_t;
+typedef struct io_tw_state io_tw_token_t;
enum {
REQ_F_FIXED_FILE_BIT = IOSQE_FIXED_FILE_BIT,