forked from Minki/linux
io-wq: use helper for worker refcounting
Use io_worker_release() instead of hand coding it in io_worker_exit(). Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/6f95f09d2cdbafcbb2e22ad0d1a2bc4d3962bf65.1634987320.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
90fa02883f
commit
c907e52c72
@ -178,8 +178,7 @@ static void io_worker_exit(struct io_worker *worker)
|
|||||||
{
|
{
|
||||||
struct io_wqe *wqe = worker->wqe;
|
struct io_wqe *wqe = worker->wqe;
|
||||||
|
|
||||||
if (refcount_dec_and_test(&worker->ref))
|
io_worker_release(worker);
|
||||||
complete(&worker->ref_done);
|
|
||||||
wait_for_completion(&worker->ref_done);
|
wait_for_completion(&worker->ref_done);
|
||||||
|
|
||||||
raw_spin_lock(&wqe->lock);
|
raw_spin_lock(&wqe->lock);
|
||||||
|
Loading…
Reference in New Issue
Block a user