diff options
Diffstat (limited to 'block/blk-core.c')
-rw-r--r-- | block/blk-core.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index 222fe84d6ac4..cfaca8ca6cc4 100644 --- a/block/blk-core.c +++ b/block/blk-core.c | |||
@@ -390,11 +390,13 @@ static void __blk_drain_queue(struct request_queue *q, bool drain_all) | |||
390 | * be drained. Check all the queues and counters. | 390 | * be drained. Check all the queues and counters. |
391 | */ | 391 | */ |
392 | if (drain_all) { | 392 | if (drain_all) { |
393 | struct blk_flush_queue *fq = blk_get_flush_queue(q); | ||
393 | drain |= !list_empty(&q->queue_head); | 394 | drain |= !list_empty(&q->queue_head); |
394 | for (i = 0; i < 2; i++) { | 395 | for (i = 0; i < 2; i++) { |
395 | drain |= q->nr_rqs[i]; | 396 | drain |= q->nr_rqs[i]; |
396 | drain |= q->in_flight[i]; | 397 | drain |= q->in_flight[i]; |
397 | drain |= !list_empty(&q->flush_queue[i]); | 398 | if (fq) |
399 | drain |= !list_empty(&fq->flush_queue[i]); | ||
398 | } | 400 | } |
399 | } | 401 | } |
400 | 402 | ||