diff options
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-core.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index 20d69f6beb6b..15de223c7f93 100644 --- a/block/blk-core.c +++ b/block/blk-core.c | |||
@@ -366,7 +366,14 @@ void blk_drain_queue(struct request_queue *q, bool drain_all) | |||
366 | if (drain_all) | 366 | if (drain_all) |
367 | blk_throtl_drain(q); | 367 | blk_throtl_drain(q); |
368 | 368 | ||
369 | __blk_run_queue(q); | 369 | /* |
370 | * This function might be called on a queue which failed | ||
371 | * driver init after queue creation. Some drivers | ||
372 | * (e.g. fd) get unhappy in such cases. Kick queue iff | ||
373 | * dispatch queue has something on it. | ||
374 | */ | ||
375 | if (!list_empty(&q->queue_head)) | ||
376 | __blk_run_queue(q); | ||
370 | 377 | ||
371 | if (drain_all) | 378 | if (drain_all) |
372 | nr_rqs = q->rq.count[0] + q->rq.count[1]; | 379 | nr_rqs = q->rq.count[0] + q->rq.count[1]; |