io_uring: flush delayed fallback task_work in cancelation
authorJens Axboe <axboe@kernel.dk>
Mon, 18 Mar 2024 16:41:25 +0000 (10:41 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 15 Apr 2024 14:10:24 +0000 (08:10 -0600)
Just like we run the inline task_work, ensure we also factor in and
run the fallback task_work.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/io_uring.c

index 951ff3b..805adeb 100644 (file)
@@ -3218,6 +3218,8 @@ static __cold bool io_uring_try_cancel_requests(struct io_ring_ctx *ctx,
        ret |= io_kill_timeouts(ctx, task, cancel_all);
        if (task)
                ret |= io_run_task_work() > 0;
+       else
+               ret |= flush_delayed_work(&ctx->fallback_work);
        return ret;
 }