diff options
Diffstat (limited to 'block/blk-sysfs.c')
-rw-r--r-- | block/blk-sysfs.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index 1fac43408911..935ea2aa0730 100644 --- a/block/blk-sysfs.c +++ b/block/blk-sysfs.c | |||
@@ -492,17 +492,15 @@ static void blk_free_queue_rcu(struct rcu_head *rcu_head) | |||
492 | * Currently, its primary task it to free all the &struct request | 492 | * Currently, its primary task it to free all the &struct request |
493 | * structures that were allocated to the queue and the queue itself. | 493 | * structures that were allocated to the queue and the queue itself. |
494 | * | 494 | * |
495 | * Caveat: | 495 | * Note: |
496 | * Hopefully the low level driver will have finished any | 496 | * The low level driver must have finished any outstanding requests first |
497 | * outstanding requests first... | 497 | * via blk_cleanup_queue(). |
498 | **/ | 498 | **/ |
499 | static void blk_release_queue(struct kobject *kobj) | 499 | static void blk_release_queue(struct kobject *kobj) |
500 | { | 500 | { |
501 | struct request_queue *q = | 501 | struct request_queue *q = |
502 | container_of(kobj, struct request_queue, kobj); | 502 | container_of(kobj, struct request_queue, kobj); |
503 | 503 | ||
504 | blk_sync_queue(q); | ||
505 | |||
506 | blkcg_exit_queue(q); | 504 | blkcg_exit_queue(q); |
507 | 505 | ||
508 | if (q->elevator) { | 506 | if (q->elevator) { |
@@ -517,9 +515,7 @@ static void blk_release_queue(struct kobject *kobj) | |||
517 | if (q->queue_tags) | 515 | if (q->queue_tags) |
518 | __blk_queue_free_tags(q); | 516 | __blk_queue_free_tags(q); |
519 | 517 | ||
520 | if (q->mq_ops) | 518 | if (!q->mq_ops) |
521 | blk_mq_free_queue(q); | ||
522 | else | ||
523 | blk_free_flush_queue(q->fq); | 519 | blk_free_flush_queue(q->fq); |
524 | 520 | ||
525 | blk_trace_shutdown(q); | 521 | blk_trace_shutdown(q); |