From: Hao Xu Date: Thu, 12 Aug 2021 04:14:34 +0000 (+0800) Subject: io_uring: extract io_uring_files_cancel() in io_uring_task_cancel() X-Git-Tag: v5.15~354^2~62 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a4aadd11ea4932588e6530ecd021ffe39f9d5adf;p=platform%2Fkernel%2Flinux-starfive.git 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 Signed-off-by: Jens Axboe --- diff --git a/include/linux/io_uring.h b/include/linux/io_uring.h index 04b650b..ed13304 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) {