summaryrefslogtreecommitdiffstats
path: root/fs/io-wq.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2021-02-15 13:26:34 -0700
committerJens Axboe <axboe@kernel.dk>2021-02-21 17:25:22 -0700
commitc6d77d92b7e53b24e8e74a58e6ef2056385cc780 (patch)
tree072041f2d127ce838e4bd5c7cdf06a02e2a744fe /fs/io-wq.c
parent3bfe6106693b6b4ba175ad1f929c4660b8f59ca8 (diff)
downloadlinux-c6d77d92b7e53b24e8e74a58e6ef2056385cc780.tar.gz
linux-c6d77d92b7e53b24e8e74a58e6ef2056385cc780.tar.xz
io-wq: worker idling always returns false
Remove the bool return, and the checking for it in the caller. Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io-wq.c')
-rw-r--r--fs/io-wq.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/fs/io-wq.c b/fs/io-wq.c
index b53f569b5b4e..41042119bf0f 100644
--- a/fs/io-wq.c
+++ b/fs/io-wq.c
@@ -305,15 +305,13 @@ static void __io_worker_busy(struct io_wqe *wqe, struct io_worker *worker,
* retry the loop in that case (we changed task state), we don't regrab
* the lock if we return success.
*/
-static bool __io_worker_idle(struct io_wqe *wqe, struct io_worker *worker)
+static void __io_worker_idle(struct io_wqe *wqe, struct io_worker *worker)
__must_hold(wqe->lock)
{
if (!(worker->flags & IO_WORKER_F_FREE)) {
worker->flags |= IO_WORKER_F_FREE;
hlist_nulls_add_head_rcu(&worker->nulls_node, &wqe->free_list);
}
-
- return false;
}
static inline unsigned int io_get_work_hash(struct io_wq_work *work)
@@ -454,11 +452,7 @@ loop:
io_worker_handle_work(worker);
goto loop;
}
- /* drops the lock on success, retry */
- if (__io_worker_idle(wqe, worker)) {
- __release(&wqe->lock);
- goto loop;
- }
+ __io_worker_idle(wqe, worker);
raw_spin_unlock_irq(&wqe->lock);
io_flush_signals();
if (schedule_timeout(WORKER_IDLE_TIMEOUT))