aboutsummaryrefslogtreecommitdiffstats
path: root/fs/io-wq.c
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2021-06-14 02:36:17 +0100
committerJens Axboe <axboe@kernel.dk>2021-06-14 08:23:13 -0600
commite587227b680f798dd74644d047dd52ddb36cb82c (patch)
tree76389457549043d21eac812261c868a468fd8343 /fs/io-wq.c
parentio-wq: don't repeat IO_WQ_BIT_EXIT check by worker (diff)
downloadlinux-dev-e587227b680f798dd74644d047dd52ddb36cb82c.tar.xz
linux-dev-e587227b680f798dd74644d047dd52ddb36cb82c.zip
io-wq: simplify worker exiting
io_worker_handle_work() already takes care of the empty list case and releases spinlock, so get rid of ugly conditional unlocking and unconditionally call handle_work() Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/7521e485677f381036676943e876a0afecc23017.1623634181.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.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/io-wq.c b/fs/io-wq.c
index 8c13e23d4a8a..2c37776c0280 100644
--- a/fs/io-wq.c
+++ b/fs/io-wq.c
@@ -565,10 +565,7 @@ loop:
if (test_bit(IO_WQ_BIT_EXIT, &wq->state)) {
raw_spin_lock_irq(&wqe->lock);
- if (!wq_list_empty(&wqe->work_list))
- io_worker_handle_work(worker);
- else
- raw_spin_unlock_irq(&wqe->lock);
+ io_worker_handle_work(worker);
}
io_worker_exit(worker);