summaryrefslogtreecommitdiff
path: root/block/blk-core.c
diff options
context:
space:
mode:
authorMing Lei <ming.lei@redhat.com>2018-10-24 21:18:09 +0800
committerJens Axboe <axboe@kernel.dk>2018-10-31 08:40:36 -0600
commitc57cdf7a9e51d97a43e29b8f4a04157875104000 (patch)
tree4b957413d55cca86e87293647d2a1d889cb02261 /block/blk-core.c
parent698b53b3119c45a59eef10b516d780b3e9a5402d (diff)
block: call rq_qos_exit() after queue is frozen
rq_qos_exit() removes the current q->rq_qos, this action has to be done after queue is frozen, otherwise the IO queue path may never be waken up, then IO hang is caused. So fixes this issue by moving rq_qos_exit() after queue is frozen. Cc: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-core.c')
-rw-r--r--block/blk-core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index bc6ea87d10e0..26a5dac80ed9 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -785,6 +785,9 @@ void blk_cleanup_queue(struct request_queue *q)
* prevent that q->request_fn() gets invoked after draining finished.
*/
blk_freeze_queue(q);
+
+ rq_qos_exit(q);
+
spin_lock_irq(lock);
queue_flag_set(QUEUE_FLAG_DEAD, q);
spin_unlock_irq(lock);