Skip to content

Commit b0af20d

Browse files
maharmstonekdave
authored andcommitted
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 <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent 3347fa6 commit b0af20d

File tree

1 file changed

+5
-0
lines changed
  • include/linux/io_uring

1 file changed

+5
-0
lines changed

include/linux/io_uring/cmd.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,4 +118,9 @@ static inline struct task_struct *io_uring_cmd_get_task(struct io_uring_cmd *cmd
118118
return cmd_to_io_kiocb(cmd)->task;
119119
}
120120

121+
static inline struct io_uring_cmd_data *io_uring_cmd_get_async_data(struct io_uring_cmd *cmd)
122+
{
123+
return cmd_to_io_kiocb(cmd)->async_data;
124+
}
125+
121126
#endif /* _LINUX_IO_URING_CMD_H */

0 commit comments

Comments
 (0)