io_uring: fix missing io_queue_linked_timeout()
Whoever called io_prep_linked_timeout() should also do
io_queue_linked_timeout(). __io_queue_sqe() doesn't follow that for the
punting path leaving linked timeouts prepared but never queued.
Fixes: 6df1db6b54
("io_uring: fix mis-refcounting linked timeouts")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
b65e0dd6a2
commit
f063c5477e
|
@ -5987,20 +5987,20 @@ again:
|
||||||
* doesn't support non-blocking read/write attempts
|
* doesn't support non-blocking read/write attempts
|
||||||
*/
|
*/
|
||||||
if (ret == -EAGAIN && !(req->flags & REQ_F_NOWAIT)) {
|
if (ret == -EAGAIN && !(req->flags & REQ_F_NOWAIT)) {
|
||||||
if (io_arm_poll_handler(req)) {
|
if (!io_arm_poll_handler(req)) {
|
||||||
if (linked_timeout)
|
|
||||||
io_queue_linked_timeout(linked_timeout);
|
|
||||||
goto exit;
|
|
||||||
}
|
|
||||||
punt:
|
punt:
|
||||||
ret = io_prep_work_files(req);
|
ret = io_prep_work_files(req);
|
||||||
if (unlikely(ret))
|
if (unlikely(ret))
|
||||||
goto err;
|
goto err;
|
||||||
/*
|
/*
|
||||||
* Queued up for async execution, worker will release
|
* Queued up for async execution, worker will release
|
||||||
* submit reference when the iocb is actually submitted.
|
* submit reference when the iocb is actually submitted.
|
||||||
*/
|
*/
|
||||||
io_queue_async_work(req);
|
io_queue_async_work(req);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (linked_timeout)
|
||||||
|
io_queue_linked_timeout(linked_timeout);
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue