1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 #ifndef _LINUX_IO_URING_H
3 #define _LINUX_IO_URING_H
5 #include <linux/sched.h>
6 #include <linux/xarray.h>
8 #if defined(CONFIG_IO_URING)
9 void __io_uring_cancel(bool cancel_all);
10 void __io_uring_free(struct task_struct *tsk);
11 bool io_is_uring_fops(struct file *file);
13 static inline void io_uring_files_cancel(void)
15 if (current->io_uring)
16 __io_uring_cancel(false);
18 static inline void io_uring_task_cancel(void)
20 if (current->io_uring)
21 __io_uring_cancel(true);
23 static inline void io_uring_free(struct task_struct *tsk)
29 static inline void io_uring_task_cancel(void)
32 static inline void io_uring_files_cancel(void)
35 static inline void io_uring_free(struct task_struct *tsk)
38 static inline bool io_is_uring_fops(struct file *file)