summaryrefslogtreecommitdiff
path: root/fs/io_uring.c
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2021-03-22 01:58:25 +0000
committerJens Axboe <axboe@kernel.dk>2021-04-11 17:41:59 -0600
commit682076801a2f46867743d9520d228e3c7eca751f (patch)
treefdff1837ed616cf311fdfb6ffad5e5bc4cff1811 /fs/io_uring.c
parentd4729fbde7665e81f4345e04e2ca86c0b52994d3 (diff)
downloadlwn-682076801a2f46867743d9520d228e3c7eca751f.tar.gz
lwn-682076801a2f46867743d9520d228e3c7eca751f.zip
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 <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r--fs/io_uring.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index a152c0fd24cc..b33cc2926ac6 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;