From 254176234222c97c5da7fd33ff8c61d06480c228 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Mon, 18 Mar 2024 10:41:25 -0600 Subject: [PATCH] io_uring: flush delayed fallback task_work in cancelation Just like we run the inline task_work, ensure we also factor in and run the fallback task_work. Signed-off-by: Jens Axboe --- io_uring/io_uring.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index 951ff3b787abf..805adebe19bed 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -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; }