io-wq: shuffle io_worker_handle_work() code
authorPavel Begunkov <asml.silence@gmail.com>
Wed, 4 Mar 2020 13:14:09 +0000 (16:14 +0300)
committerJens Axboe <axboe@kernel.dk>
Wed, 4 Mar 2020 18:39:03 +0000 (11:39 -0700)
commitdc026a73c7221b4d9d146ed0bde69ff578ebe8dc
treeb88bb2f26281b2208b3dd3363c98543b7e6a975a
parent7a743e225b2a9da772b28a50031e1ccd8a8ce404
io-wq: shuffle io_worker_handle_work() code

This is a preparation patch, it adds some helpers and makes
the next patches cleaner.

- extract io_impersonate_work() and io_assign_current_work()
- replace @next label with nested do-while
- move put_work() right after NULL'ing cur_work.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io-wq.c