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 9b1f358..24fc99d 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -369,7 +369,14 @@ void blk_drain_queue(struct request_queue *q, bool drain_all) if (drain_all) blk_throtl_drain(q); - __blk_run_queue(q); + /* + * This function might be called on a queue which failed + * driver init after queue creation. Some drivers + * (e.g. fd) get unhappy in such cases. Kick queue iff + * dispatch queue has something on it. + */ + if (!list_empty(&q->queue_head)) + __blk_run_queue(q); drain |= q->rq.elvpriv; |