diff options
author | Hao Xu <haoxu@linux.alibaba.com> | 2021-08-12 06:14:34 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-08-23 21:10:37 +0200 |
commit | a4aadd11ea4932588e6530ecd021ffe39f9d5adf (patch) | |
tree | 4422cedbcad8202c5c20fa776bc3471c121b692e | |
parent | io_uring: optimise hot path of ltimeout prep (diff) | |
download | linux-a4aadd11ea4932588e6530ecd021ffe39f9d5adf.tar.xz linux-a4aadd11ea4932588e6530ecd021ffe39f9d5adf.zip |
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>
-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) { |