From: Pavel Begunkov Date: Sat, 23 Oct 2021 11:13:55 +0000 (+0100) Subject: io-wq: use helper for worker refcounting X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=c907e52c72dee710f3bf7c751822df8371924a84;p=linux.git 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 Link: https://lore.kernel.org/r/6f95f09d2cdbafcbb2e22ad0d1a2bc4d3962bf65.1634987320.git.asml.silence@gmail.com Signed-off-by: Jens Axboe --- diff --git a/fs/io-wq.c b/fs/io-wq.c index 811299ac96848..0c283bb18fb24 100644 --- a/fs/io-wq.c +++ b/fs/io-wq.c @@ -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);