io-wq: ensure task is running before processing task_work
authorJens Axboe <axboe@kernel.dk>
Sun, 21 Mar 2021 13:06:56 +0000 (07:06 -0600)
committerJens Axboe <axboe@kernel.dk>
Sun, 21 Mar 2021 15:41:14 +0000 (09:41 -0600)
commit00ddff431a458bbf143ea7c4c42d022676da1b17
treea2c094c16df92bbe8c2040d7346541d019b1b2be
parent4db4b1a0d1779dc159f7b87feb97030ec0b12597
io-wq: ensure task is running before processing task_work

Mark the current task as running if we need to run task_work from the
io-wq threads as part of work handling. If that is the case, then return
as such so that the caller can appropriately loop back and reset if it
was part of a going-to-sleep flush.

Fixes: 3bfe6106693b ("io-wq: fork worker threads from original task")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io-wq.c