]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commita562b7433c55e0f25183c9827e664f36617501ee
treea2c094c16df92bbe8c2040d7346541d019b1b2be
parentdd9f2d9ee7eccd48ecfd1f49c54b20b1e31e505d
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: 869731a7cd2f ("io-wq: fork worker threads from original task")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io-wq.c