Commit c907e52c authored by Pavel Begunkov's avatar Pavel Begunkov Committed by Jens Axboe

io-wq: use helper for worker refcounting

Use io_worker_release() instead of hand coding it in io_worker_exit().
Signed-off-by: default avatarPavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/6f95f09d2cdbafcbb2e22ad0d1a2bc4d3962bf65.1634987320.git.asml.silence@gmail.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 90fa0288
......@@ -178,8 +178,7 @@ static void io_worker_exit(struct io_worker *worker)
{
struct io_wqe *wqe = worker->wqe;
if (refcount_dec_and_test(&worker->ref))
complete(&worker->ref_done);
io_worker_release(worker);
wait_for_completion(&worker->ref_done);
raw_spin_lock(&wqe->lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment