Skip to content

Commit

Permalink
io-wq: delete dead lock shuffling code
Browse files Browse the repository at this point in the history
We used to have more code around the work loop, but now the goto and
lock juggling just makes it less readable than it should. Get rid of it.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
axboe committed Jan 19, 2022
1 parent ccbf726 commit 73031f7
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions fs/io-wq.c
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ static void io_worker_handle_work(struct io_worker *worker)

do {
struct io_wq_work *work;
get_next:

/*
* If we got some work, mark us as busy. If we didn't, but
* the list isn't empty, it means we stalled on hashed work.
Expand Down Expand Up @@ -606,11 +606,6 @@ static void io_worker_handle_work(struct io_worker *worker)
spin_unlock_irq(&wq->hash->wait.lock);
if (wq_has_sleeper(&wq->hash->wait))
wake_up(&wq->hash->wait);
raw_spin_lock(&wqe->lock);
/* skip unnecessary unlock-lock wqe->lock */
if (!work)
goto get_next;
raw_spin_unlock(&wqe->lock);
}
} while (work);

Expand Down

0 comments on commit 73031f7

Please sign in to comment.