Skip to content
Commit afcc4015 authored by Jens Axboe's avatar Jens Axboe
Browse files

io-wq: provide an io_wq_put_and_exit() helper



If we put the io-wq from io_uring, we really want it to exit. Provide
a helper that does that for us. Couple that with not having the manager
hold a reference to the 'wq' and the normal SQPOLL exit will tear down
the io-wq context appropriate.

On the io-wq side, our wq context is per task, so only the task itself
is manipulating ->manager and hence it's safe to check and clear without
any extra locking. We just need to ensure that the manager task stays
around, in case it exits.

Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 8629397e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment