io_uring: wait for cancelations on final ring put
authorJens Axboe <axboe@kernel.dk>
Fri, 7 Jul 2023 17:20:27 +0000 (11:20 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 21 Apr 2025 11:13:59 +0000 (05:13 -0600)
commit51743a3c92dede65077a4799dd8d0e7e2b1449e3
tree8ecfce4a4dcae25f8f99e6d6c860a17706a2595e
parent442de2e3974b1de19b0f78eafcea5ba049a0a1d3
io_uring: wait for cancelations on final ring put

We still offload the cancelation to a workqueue, as not to introduce
dependencies between the exiting task waiting on cleanup, and that
task needing to run task_work to complete the process.

This means that once the final ring put is done, any request that was
inflight and needed cancelation will be done as well. Notably requests
that hold references to files - once the ring fd close is done, we will
have dropped any of those references too.

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