|
@@ -492,17 +492,15 @@ static void blk_free_queue_rcu(struct rcu_head *rcu_head)
|
|
|
* Currently, its primary task it to free all the &struct request
|
|
|
* structures that were allocated to the queue and the queue itself.
|
|
|
*
|
|
|
- * Caveat:
|
|
|
- * Hopefully the low level driver will have finished any
|
|
|
- * outstanding requests first...
|
|
|
+ * Note:
|
|
|
+ * The low level driver must have finished any outstanding requests first
|
|
|
+ * via blk_cleanup_queue().
|
|
|
**/
|
|
|
static void blk_release_queue(struct kobject *kobj)
|
|
|
{
|
|
|
struct request_queue *q =
|
|
|
container_of(kobj, struct request_queue, kobj);
|
|
|
|
|
|
- blk_sync_queue(q);
|
|
|
-
|
|
|
blkcg_exit_queue(q);
|
|
|
|
|
|
if (q->elevator) {
|
|
@@ -517,9 +515,7 @@ static void blk_release_queue(struct kobject *kobj)
|
|
|
if (q->queue_tags)
|
|
|
__blk_queue_free_tags(q);
|
|
|
|
|
|
- if (q->mq_ops)
|
|
|
- blk_mq_free_queue(q);
|
|
|
- else
|
|
|
+ if (!q->mq_ops)
|
|
|
blk_free_flush_queue(q->fq);
|
|
|
|
|
|
blk_trace_shutdown(q);
|