Re: [PATCH] io_uring/wait: make check for pending io consider cached task references

From: Jens Axboe

Date: Mon Apr 27 2026 - 13:23:02 EST


On 4/27/26 10:58 AM, Fiona Ebner wrote:
> The io_uring task's inflight count also includes the reservations for
> task references from io_task_refs_refill(), not just in-flight
> requests. Thus, pending requests are present if the inflight count is
> larger than the number of cached references.
>
> Co-developed-by: Thomas Lamprecht <t.lamprecht@xxxxxxxxxxx>
> Signed-off-by: Thomas Lamprecht <t.lamprecht@xxxxxxxxxxx>
> Signed-off-by: Fiona Ebner <f.ebner@xxxxxxxxxxx>

Looks go to me! Just needs:

Cc: stable@xxxxxxxxxxxxxxx
Fixes: 7b72d661f1f2 ("io_uring: gate iowait schedule on having pending requests")

tags added, I will do that. Thanks for debugging this and sending a fix.

--
Jens Axboe