diff options
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r-- | block/blk-mq.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index a6ee74e27957..75fc33f34251 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c | |||
@@ -82,8 +82,10 @@ static int blk_mq_queue_enter(struct request_queue *q) | |||
82 | 82 | ||
83 | __percpu_counter_add(&q->mq_usage_counter, 1, 1000000); | 83 | __percpu_counter_add(&q->mq_usage_counter, 1, 1000000); |
84 | smp_wmb(); | 84 | smp_wmb(); |
85 | /* we have problems to freeze the queue if it's initializing */ | 85 | |
86 | if (!blk_queue_bypass(q) || !blk_queue_init_done(q)) | 86 | /* we have problems freezing the queue if it's initializing */ |
87 | if (!blk_queue_dying(q) && | ||
88 | (!blk_queue_bypass(q) || !blk_queue_init_done(q))) | ||
87 | return 0; | 89 | return 0; |
88 | 90 | ||
89 | __percpu_counter_add(&q->mq_usage_counter, -1, 1000000); | 91 | __percpu_counter_add(&q->mq_usage_counter, -1, 1000000); |