diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 21:00:30 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 21:00:30 +0000 |
commit | e54def4ad8144ab15f826416e2e0f290ef1901b4 (patch) | |
tree | 583f8d4bd95cd67c44ff37b878a7eddfca9ab97a /io_uring/io-wq.c | |
parent | Adding upstream version 6.8.12. (diff) | |
download | linux-e54def4ad8144ab15f826416e2e0f290ef1901b4.tar.xz linux-e54def4ad8144ab15f826416e2e0f290ef1901b4.zip |
Adding upstream version 6.9.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'io_uring/io-wq.c')
-rw-r--r-- | io_uring/io-wq.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/io_uring/io-wq.c b/io_uring/io-wq.c index 318ed067db..522196dfb0 100644 --- a/io_uring/io-wq.c +++ b/io_uring/io-wq.c @@ -564,7 +564,10 @@ static void io_worker_handle_work(struct io_wq_acct *acct, * clear the stalled flag. */ work = io_get_next_work(acct, worker); + raw_spin_unlock(&acct->lock); if (work) { + __io_worker_busy(wq, worker); + /* * Make sure cancelation can find this, even before * it becomes the active work. That avoids a window @@ -575,15 +578,9 @@ static void io_worker_handle_work(struct io_wq_acct *acct, raw_spin_lock(&worker->lock); worker->next_work = work; raw_spin_unlock(&worker->lock); - } - - raw_spin_unlock(&acct->lock); - - if (!work) + } else { break; - - __io_worker_busy(wq, worker); - + } io_assign_current_work(worker, work); __set_current_state(TASK_RUNNING); |