Skip to content
Snippets Groups Projects
Commit 613eeb60 authored by Jens Axboe's avatar Jens Axboe
Browse files

io-wq: don't ask for a new worker if we're exiting


If we're in the process of shutting down the async context, then don't
create new workers if we already have at least the fixed one.

Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent fb3a1f6c
No related branches found
No related tags found
No related merge requests found
......@@ -673,6 +673,8 @@ static inline bool io_wqe_need_worker(struct io_wqe *wqe, int index)
{
struct io_wqe_acct *acct = &wqe->acct[index];
if (acct->nr_workers && test_bit(IO_WQ_BIT_EXIT, &wqe->wq->state))
return false;
/* if we have available workers or no work, no need */
if (!hlist_nulls_empty(&wqe->free_list) || !io_wqe_run_queue(wqe))
return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment