|
@@ -762,9 +762,13 @@ void blk_cleanup_queue(struct request_queue *q)
|
|
* make sure all in-progress dispatch are completed because
|
|
* make sure all in-progress dispatch are completed because
|
|
* blk_freeze_queue() can only complete all requests, and
|
|
* blk_freeze_queue() can only complete all requests, and
|
|
* dispatch may still be in-progress since we dispatch requests
|
|
* dispatch may still be in-progress since we dispatch requests
|
|
- * from more than one contexts
|
|
|
|
|
|
+ * from more than one contexts.
|
|
|
|
+ *
|
|
|
|
+ * No need to quiesce queue if it isn't initialized yet since
|
|
|
|
+ * blk_freeze_queue() should be enough for cases of passthrough
|
|
|
|
+ * request.
|
|
*/
|
|
*/
|
|
- if (q->mq_ops)
|
|
|
|
|
|
+ if (q->mq_ops && blk_queue_init_done(q))
|
|
blk_mq_quiesce_queue(q);
|
|
blk_mq_quiesce_queue(q);
|
|
|
|
|
|
/* for synchronous bio-based driver finish in-flight integrity i/o */
|
|
/* for synchronous bio-based driver finish in-flight integrity i/o */
|