Skip to content

Commit

Permalink
io_uring: use io_req_task_complete() in timeout
Browse files Browse the repository at this point in the history
[ Upstream commit 624fd77 ]

Use a more generic io_req_task_complete() in timeout completion
task_work instead of io_req_complete_post().

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/bda1710b58c07bf06107421c2a65c529ea9cdcac.1669203009.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Stable-dep-of: ef5c600 ("io_uring: always prep_async for drain requests")
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
isilence authored and gregkh committed Feb 1, 2023
1 parent 0c4d95a commit 65aeb34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions io_uring/timeout.c
Expand Up @@ -284,11 +284,11 @@ static void io_req_task_link_timeout(struct io_kiocb *req, bool *locked)
ret = io_try_cancel(req->task->io_uring, &cd, issue_flags);
}
io_req_set_res(req, ret ?: -ETIME, 0);
io_req_complete_post(req);
io_req_task_complete(req, locked);
io_put_req(prev);
} else {
io_req_set_res(req, -ETIME, 0);
io_req_complete_post(req);
io_req_task_complete(req, locked);
}
}

Expand Down

0 comments on commit 65aeb34

Please sign in to comment.