From: Josef Bacik josef@toxicpanda.com
[ Upstream commit d14a9b389a86a5154b704bc88ce8dd37c701456a ]
In case we get a spurious wakeup we need to make sure to re-set ourselves to TASK_UNINTERRUPTIBLE so we don't busy wait.
Reviewed-by: Oleg Nesterov oleg@redhat.com Signed-off-by: Josef Bacik josef@toxicpanda.com Signed-off-by: Jens Axboe axboe@kernel.dk Signed-off-by: Sasha Levin sashal@kernel.org --- block/blk-rq-qos.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/block/blk-rq-qos.c b/block/blk-rq-qos.c index e5d75280b431e..e3ab75e4df9ea 100644 --- a/block/blk-rq-qos.c +++ b/block/blk-rq-qos.c @@ -261,6 +261,7 @@ void rq_qos_wait(struct rq_wait *rqw, void *private_data, } io_schedule(); has_sleeper = true; + set_current_state(TASK_UNINTERRUPTIBLE); } while (1); finish_wait(&rqw->wait, &data.wq); }