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>
Mon, 1 Mar 2021 17:21:06 +0000 (10:21 -0700)
commit9196d672605c17d3f3ad8e7019275a79968637d4
tree271dde42d9dfde69ed48b9dc1629acb1da3ee658
parent65d43023171edc0d27208f6ac7a1a73732950cf7
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