io_uring: wait for cancelations on final ring put io_uring-exit-cancel
authorJens Axboe <axboe@kernel.dk>
Fri, 7 Jul 2023 17:20:27 +0000 (11:20 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 4 Jun 2024 17:39:52 +0000 (11:39 -0600)
commitff28764157a66c84816ee8ee0de9b357c66bcfc0
treeb1a0fa4d1f9712257d613849031cddd3d6b93354
parent56937fb098867592a1520fc71c9e08afbb2d8fd7
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