]> git.baikalelectronics.ru Git - kernel.git/commit
io-wq: fix bug of creating io-wokers unconditionally
authorHao Xu <haoxu@linux.alibaba.com>
Sun, 8 Aug 2021 13:54:33 +0000 (21:54 +0800)
committerJens Axboe <axboe@kernel.dk>
Tue, 10 Aug 2021 01:59:06 +0000 (19:59 -0600)
commitb6e1db2b3e03621d0d5f8090f2f5414a26aef6c2
tree759616576ebaa3498952e4dd8d23746738d0bed1
parentf1512047e2b1ce486a8811c1d340433bcce5ab67
io-wq: fix bug of creating io-wokers unconditionally

The former patch to add check between nr_workers and max_workers has a
bug, which will cause unconditionally creating io-workers. That's
because the result of the check doesn't affect the call of
create_io_worker(), fix it by bringing in a boolean value for it.

Fixes: eb02245c1032 ("io-wq: fix lack of acct->nr_workers < acct->max_workers judgement")
Signed-off-by: Hao Xu <haoxu@linux.alibaba.com>
Link: https://lore.kernel.org/r/20210808135434.68667-2-haoxu@linux.alibaba.com
[axboe: drop hunk that isn't strictly needed]
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io-wq.c