From: Hao Xu <howeyxu@xxxxxxxxxxx> acct->nr_workers should be decremented when we break the loop in io_wq_worker(). Fixes: 78f8876c2d9f ("io-wq: exclusively gate signal based exit on get_signal() return") Signed-off-by: Hao Xu <howeyxu@xxxxxxxxxxx> --- io_uring/io-wq.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/io_uring/io-wq.c b/io_uring/io-wq.c index b2715988791e..b70eebec2845 100644 --- a/io_uring/io-wq.c +++ b/io_uring/io-wq.c @@ -634,6 +634,10 @@ static int io_wq_worker(void *data) if (!get_signal(&ksig)) continue; + + raw_spin_lock(&wq->lock); + acct->nr_workers--; + raw_spin_unlock(&wq->lock); break; } if (!ret) { -- 2.25.1