From: Josef Bacik Date: Tue, 16 Jul 2019 20:19:28 +0000 (-0400) Subject: rq-qos: set ourself TASK_UNINTERRUPTIBLE after we schedule X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=d14a9b389a86a5154b704bc88ce8dd37c701456a;p=openwrt%2Fstaging%2Fblogic.git rq-qos: set ourself TASK_UNINTERRUPTIBLE after we schedule 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 Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe --- diff --git a/block/blk-rq-qos.c b/block/blk-rq-qos.c index 69a0f0b77795..c450b8952eae 100644 --- a/block/blk-rq-qos.c +++ b/block/blk-rq-qos.c @@ -262,6 +262,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); }