diff options
author | Hao Xu <haoxu@linux.alibaba.com> | 2021-08-12 07:14:34 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-08-23 22:10:37 +0300 |
commit | a4aadd11ea4932588e6530ecd021ffe39f9d5adf (patch) | |
tree | 4422cedbcad8202c5c20fa776bc3471c121b692e /include/linux/io_uring.h | |
parent | fd08e5309bba8672c1190362dff6c92bfd59218d (diff) | |
download | linux-a4aadd11ea4932588e6530ecd021ffe39f9d5adf.tar.xz |
io_uring: extract io_uring_files_cancel() in io_uring_task_cancel()
Extract io_uring_files_cancel() call in io_uring_task_cancel() to make
io_uring_files_cancel() and io_uring_task_cancel() coherent and easy to
read.
Signed-off-by: Hao Xu <haoxu@linux.alibaba.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/io_uring.h')
-rw-r--r-- | include/linux/io_uring.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/io_uring.h b/include/linux/io_uring.h index 04b650bcbbe5..ed13304e764c 100644 --- a/include/linux/io_uring.h +++ b/include/linux/io_uring.h @@ -17,7 +17,8 @@ static inline void io_uring_files_cancel(struct files_struct *files) } static inline void io_uring_task_cancel(void) { - return io_uring_files_cancel(NULL); + if (current->io_uring) + __io_uring_cancel(NULL); } static inline void io_uring_free(struct task_struct *tsk) { |