summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMark Harmstone <maharmstone@fb.com>2025-01-03 16:02:25 +0100
committerDavid Sterba <dsterba@suse.com>2025-01-06 13:51:08 +0100
commitb0af20d33f63c74985a6dd98344326e5111b2fea (patch)
tree2e25f55ef5c75b66cb8405cb4ebfe7e9a31295a7 /include
parentio_uring/cmd: add per-op data to struct io_uring_cmd_data (diff)
downloadlinux-b0af20d33f63c74985a6dd98344326e5111b2fea.tar.xz
linux-b0af20d33f63c74985a6dd98344326e5111b2fea.zip
io_uring: add io_uring_cmd_get_async_data helper
Add a helper function in include/linux/io_uring/cmd.h to read the async_data pointer from a struct io_uring_cmd. Signed-off-by: Mark Harmstone <maharmstone@fb.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/io_uring/cmd.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/io_uring/cmd.h b/include/linux/io_uring/cmd.h
index 3df6636ec3a3..b0aeec834c1d 100644
--- a/include/linux/io_uring/cmd.h
+++ b/include/linux/io_uring/cmd.h
@@ -118,4 +118,9 @@ static inline struct task_struct *io_uring_cmd_get_task(struct io_uring_cmd *cmd
return cmd_to_io_kiocb(cmd)->task;
}
+static inline struct io_uring_cmd_data *io_uring_cmd_get_async_data(struct io_uring_cmd *cmd)
+{
+ return cmd_to_io_kiocb(cmd)->async_data;
+}
+
#endif /* _LINUX_IO_URING_CMD_H */