io_uring: fail links of cancelled timeouts
PATCH 1/1 io_uring: fail links of cancelled timeouts
When we cancel a timeout we should mark it with REQ_F_FAIL, so linked requests are cancelled as well, but not queued for further execution.
Signed-off-by Pavel Begunkov <[email protected]>
--- fs/io_uring.c | 2 ++ 1 file changed, 2 insertions(+)
fs/io_uring.c +2 -0
@@ -1486,6 +1486,8 @@ static void io_kill_timeout(struct io_kiocb *req, int status)struct io_timeout_data *io = req->async_data;if (hrtimer_try_to_cancel (&io->timer) !=-1 ) { +if (status) +req_set_fail (req);atomic_set (&req->ctx->cq_timeouts,atomic_read (&req->ctx->cq_timeouts) +1 );list_del_init (&req->timeout.list);
Signature · 1 line
2.33.0
Quoted 3 lines · Pavel Begunkov
When we cancel a timeout we should mark it with
REQ_F_FAIL, so linked requests are cancelled as well, but not queued for further execution.
Applied, thanks.
Signature · 1 line
Jens Axboe