Pass tctx to io_uring_del_task_file() from above. No functional changes. Signed-off-by: Pavel Begunkov <asml.silence@xxxxxxxxx> --- fs/io_uring.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/fs/io_uring.c b/fs/io_uring.c index 3a3177739b13..1794ad4bfa39 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -8882,10 +8882,9 @@ static int io_uring_add_task_file(struct io_ring_ctx *ctx, struct file *file) /* * Remove this io_uring_file -> task mapping. */ -static void io_uring_del_task_file(struct file *file) +static void io_uring_del_task_file(struct io_uring_task *tctx, + struct file *file) { - struct io_uring_task *tctx = current->io_uring; - if (tctx->last == file) tctx->last = NULL; file = xa_erase(&tctx->xa, (unsigned long)file); @@ -8907,7 +8906,7 @@ static void io_uring_attempt_task_drop(struct file *file) */ if (fatal_signal_pending(current) || (current->flags & PF_EXITING) || atomic_long_read(&file->f_count) == 2) - io_uring_del_task_file(file); + io_uring_del_task_file(current->io_uring, file); } void __io_uring_files_cancel(struct files_struct *files) @@ -8924,7 +8923,7 @@ void __io_uring_files_cancel(struct files_struct *files) io_uring_cancel_task_requests(ctx, files); if (files) - io_uring_del_task_file(file); + io_uring_del_task_file(tctx, file); } atomic_dec(&tctx->in_idle); -- 2.24.0