summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorJosef Bacik2019-07-16 22:19:28 +0200
committerJens Axboe2019-07-18 18:20:13 +0200
commitd14a9b389a86a5154b704bc88ce8dd37c701456a (patch)
tree9eb9a85600a97d69d33fb701f240d7d3f58f90db /block
parentrq-qos: don't reset has_sleepers on spurious wakeups (diff)
downloadkernel-qcow2-linux-d14a9b389a86a5154b704bc88ce8dd37c701456a.tar.gz
kernel-qcow2-linux-d14a9b389a86a5154b704bc88ce8dd37c701456a.tar.xz
kernel-qcow2-linux-d14a9b389a86a5154b704bc88ce8dd37c701456a.zip
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);
}