diff options
Diffstat (limited to 'block/blk-core.c')
| -rw-r--r-- | block/blk-core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index 419d600e6637..1bf83a0df0f6 100644 --- a/block/blk-core.c +++ b/block/blk-core.c | |||
| @@ -413,7 +413,7 @@ int blk_queue_enter(struct request_queue *q, blk_mq_req_flags_t flags) | |||
| 413 | smp_rmb(); | 413 | smp_rmb(); |
| 414 | 414 | ||
| 415 | wait_event(q->mq_freeze_wq, | 415 | wait_event(q->mq_freeze_wq, |
| 416 | (atomic_read(&q->mq_freeze_depth) == 0 && | 416 | (!q->mq_freeze_depth && |
| 417 | (pm || (blk_pm_request_resume(q), | 417 | (pm || (blk_pm_request_resume(q), |
| 418 | !blk_queue_pm_only(q)))) || | 418 | !blk_queue_pm_only(q)))) || |
| 419 | blk_queue_dying(q)); | 419 | blk_queue_dying(q)); |
| @@ -503,6 +503,7 @@ struct request_queue *blk_alloc_queue_node(gfp_t gfp_mask, int node_id) | |||
| 503 | spin_lock_init(&q->queue_lock); | 503 | spin_lock_init(&q->queue_lock); |
| 504 | 504 | ||
| 505 | init_waitqueue_head(&q->mq_freeze_wq); | 505 | init_waitqueue_head(&q->mq_freeze_wq); |
| 506 | mutex_init(&q->mq_freeze_lock); | ||
| 506 | 507 | ||
| 507 | /* | 508 | /* |
| 508 | * Init percpu_ref in atomic mode so that it's faster to shutdown. | 509 | * Init percpu_ref in atomic mode so that it's faster to shutdown. |
