summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kellermann <max.kellermann@ionos.com>2025-01-28 14:39:25 +0100
committerJens Axboe <axboe@kernel.dk>2025-02-17 05:34:45 -0700
commit7d568502ef90e645e3f1afe4e10467d5952ddf87 (patch)
tree1a517f53a927571bea614174e2928d3ba1c01d64
parent486ba4d84d62e92716cd395c4b1612b8ce70a257 (diff)
io_uring/io-wq: pass io_wq to io_get_next_work()
The only caller has already determined this pointer, so let's skip the redundant dereference. Signed-off-by: Max Kellermann <max.kellermann@ionos.com> Link: https://lore.kernel.org/r/20250128133927.3989681-7-max.kellermann@ionos.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--io_uring/io-wq.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/io_uring/io-wq.c b/io_uring/io-wq.c
index 6e31f312b61a..f7d328feb722 100644
--- a/io_uring/io-wq.c
+++ b/io_uring/io-wq.c
@@ -485,13 +485,12 @@ static bool io_wait_on_hash(struct io_wq *wq, unsigned int hash)
}
static struct io_wq_work *io_get_next_work(struct io_wq_acct *acct,
- struct io_worker *worker)
+ struct io_wq *wq)
__must_hold(acct->lock)
{
struct io_wq_work_node *node, *prev;
struct io_wq_work *work, *tail;
unsigned int stall_hash = -1U;
- struct io_wq *wq = worker->wq;
wq_list_for_each(node, prev, &acct->work_list) {
unsigned int work_flags;
@@ -576,7 +575,7 @@ static void io_worker_handle_work(struct io_wq_acct *acct,
* can't make progress, any work completion or insertion will
* clear the stalled flag.
*/
- work = io_get_next_work(acct, worker);
+ work = io_get_next_work(acct, wq);
if (work) {
/*
* Make sure cancelation can find this, even before