From: Pavel Begunkov Date: Sun, 20 Dec 2020 13:21:44 +0000 (+0000) Subject: io_uring: end waiting before task cancel attempts X-Git-Tag: v5.11-rc1~23^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f57555eda979ca085d2524db81e14b8a6089e15e;p=thirdparty%2Fkernel%2Flinux.git io_uring: end waiting before task cancel attempts Get rid of TASK_UNINTERRUPTIBLE and waiting with finish_wait before going for next iteration in __io_uring_task_cancel(), because __io_uring_files_cancel() doesn't expect that sheduling is disallowed. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe --- diff --git a/fs/io_uring.c b/fs/io_uring.c index d0ab6b503a9f5..fbf747803dbc1 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -8989,9 +8989,9 @@ void __io_uring_task_cancel(void) if (inflight != tctx_inflight(tctx)) continue; schedule(); + finish_wait(&tctx->wait, &wait); } while (1); - finish_wait(&tctx->wait, &wait); atomic_dec(&tctx->in_idle); }