]> git.baikalelectronics.ru Git - kernel.git/commit
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>
Thu, 4 Mar 2021 13:32:33 +0000 (06:32 -0700)
commit200cf0bccce29cd7363deee7513e9037acf11608
tree01937fa6ddfcf326fb284a60966a02e8e2ad376b
parenta8024103b48a86d4eeb60d4be1e763b7ab2ff92e
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