summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2019-07-16 16:19:28 -0400
committerJens Axboe <axboe@kernel.dk>2019-07-18 10:20:13 -0600
commitd14a9b389a86a5154b704bc88ce8dd37c701456a (patch)
tree9eb9a85600a97d69d33fb701f240d7d3f58f90db /block
parent64e7ea875ef63b2801be7954cf7257d1bfccc266 (diff)
downloadlinux-d14a9b389a86a5154b704bc88ce8dd37c701456a.tar.bz2
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 <oleg@redhat.com> Signed-off-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r--block/blk-rq-qos.c1
1 files changed, 1 insertions, 0 deletions
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);
}