summaryrefslogtreecommitdiff
path: root/fs/io-wq.c
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2021-10-23 12:13:55 +0100
committerJens Axboe <axboe@kernel.dk>2021-10-23 08:03:46 -0600
commitc907e52c72dee710f3bf7c751822df8371924a84 (patch)
treec61b1ba5083c70977d1323e2067567253468c262 /fs/io-wq.c
parent90fa02883f063b971ebfd9f5b2184b38b83b7ee3 (diff)
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>
Diffstat (limited to 'fs/io-wq.c')
-rw-r--r--fs/io-wq.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/io-wq.c b/fs/io-wq.c
index 811299ac9684..0c283bb18fb2 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);