summaryrefslogtreecommitdiffstats
path: root/include/linux/io_uring.h
diff options
context:
space:
mode:
authorHao Xu <haoxu@linux.alibaba.com>2021-08-12 12:14:35 +0800
committerJens Axboe <axboe@kernel.dk>2021-08-23 13:10:37 -0600
commitf552a27afe67f05c47bb0c33b92af2a23b684c31 (patch)
tree8912511828074b3ef4892889497fce23a4d5612c /include/linux/io_uring.h
parenta4aadd11ea4932588e6530ecd021ffe39f9d5adf (diff)
downloadlinux-stable-f552a27afe67f05c47bb0c33b92af2a23b684c31.tar.gz
linux-stable-f552a27afe67f05c47bb0c33b92af2a23b684c31.tar.bz2
linux-stable-f552a27afe67f05c47bb0c33b92af2a23b684c31.zip
io_uring: remove files pointer in cancellation functions
When doing cancellation, we use a parameter to indicate where it's from do_exit or exec. So a boolean value is good enough for this, remove the struct files* as it is not necessary. Signed-off-by: Hao Xu <haoxu@linux.alibaba.com> [axboe: fixup io_uring_files_cancel for !CONFIG_IO_URING] Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/io_uring.h')
-rw-r--r--include/linux/io_uring.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/linux/io_uring.h b/include/linux/io_uring.h
index ed13304e764c..649a4d7c241b 100644
--- a/include/linux/io_uring.h
+++ b/include/linux/io_uring.h
@@ -7,18 +7,18 @@
#if defined(CONFIG_IO_URING)
struct sock *io_uring_get_socket(struct file *file);
-void __io_uring_cancel(struct files_struct *files);
+void __io_uring_cancel(bool cancel_all);
void __io_uring_free(struct task_struct *tsk);
-static inline void io_uring_files_cancel(struct files_struct *files)
+static inline void io_uring_files_cancel(void)
{
if (current->io_uring)
- __io_uring_cancel(files);
+ __io_uring_cancel(false);
}
static inline void io_uring_task_cancel(void)
{
if (current->io_uring)
- __io_uring_cancel(NULL);
+ __io_uring_cancel(true);
}
static inline void io_uring_free(struct task_struct *tsk)
{
@@ -33,7 +33,7 @@ static inline struct sock *io_uring_get_socket(struct file *file)
static inline void io_uring_task_cancel(void)
{
}
-static inline void io_uring_files_cancel(struct files_struct *files)
+static inline void io_uring_files_cancel(void)
{
}
static inline void io_uring_free(struct task_struct *tsk)