From: Pavel Begunkov Date: Mon, 22 Mar 2021 01:58:25 +0000 (+0000) Subject: io_uring: don't do extra EXITING cancellations X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=682076801a2f46867743d9520d228e3c7eca751f;p=linux.git io_uring: don't do extra EXITING cancellations io_match_task() matches all requests with PF_EXITING task, even though those may be valid requests. It was necessary for SQPOLL cancellation, but now it kills all requests before exiting via io_uring_cancel_sqpoll(), so it's not needed. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe --- diff --git a/fs/io_uring.c b/fs/io_uring.c index a152c0fd24cc1..b33cc2926ac61 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -1079,12 +1079,8 @@ static bool io_match_task(struct io_kiocb *head, { struct io_kiocb *req; - if (task && head->task != task) { - /* in terms of cancelation, always match if req task is dead */ - if (head->task->flags & PF_EXITING) - return true; + if (task && head->task != task) return false; - } if (!files) return true;