io-wq: have manager wait for all workers to exit
authorJens Axboe <axboe@kernel.dk>
Fri, 26 Feb 2021 16:47:20 +0000 (09:47 -0700)
committerJens Axboe <axboe@kernel.dk>
Sun, 28 Feb 2021 17:28:55 +0000 (10:28 -0700)
commit3c86b7b49a1151454b06e1947fc93241c214f2fb
tree98d960b2f3401357c7b58b726acba6bcadb72eec
parent6bed60424db67ab1af079b76805f9225f99480bd
io-wq: have manager wait for all workers to exit

Instead of having to wait separately on workers and manager, just have
the manager wait on the workers. We use an atomic_t for the reference
here, as we need to start at 0 and allow increment from that. Since the
number of workers is naturally capped by the allowed nr of processes,
and that uses an int, there is no risk of overflow.

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