]> git.baikalelectronics.ru Git - kernel.git/commit
io-wq: fix queue stalling race
authorJens Axboe <axboe@kernel.dk>
Tue, 31 Aug 2021 19:53:00 +0000 (13:53 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 31 Aug 2021 19:53:00 +0000 (13:53 -0600)
commit6b265b7badfff3fa25ae115013c700cb7588d219
tree80d4226ac1a2b1460900aea9d8e4e6d018410ad8
parentde4681d6f87e704463a2bf9a4e785d4976fd273c
io-wq: fix queue stalling race

We need to set the stalled bit early, before we drop the lock for adding
us to the stall hash queue. If not, then we can race with new work being
queued between adding us to the stall hash and io_worker_handle_work()
marking us stalled.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io-wq.c