Skip to content

Commit

Permalink
io_uring: don't do extra EXITING cancellations
Browse files Browse the repository at this point in the history
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 <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Pavel Begunkov authored and Jens Axboe committed Apr 11, 2021
1 parent d4729fb commit 6820768
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions fs/io_uring.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 6820768

Please sign in to comment.