diff options
author | Bart Van Assche <[email protected]> | 2016-10-28 17:23:19 -0700 |
---|---|---|
committer | Jens Axboe <[email protected]> | 2016-11-02 12:50:19 -0600 |
commit | 3174dd33fa8316d29f238f093291ca9bb25e6f58 (patch) | |
tree | f4f2d0c3dc750d6de882b5a32867edeb51249edc | |
parent | 7b17c2f7292ba1f3f98dae3f7077f9e569653276 (diff) |
nvme: Fix a race condition related to stopping queues
Avoid that nvme_queue_rq() is still running when nvme_stop_queues()
returns.
Signed-off-by: Bart Van Assche <[email protected]>
Cc: Keith Busch <[email protected]>
Reviewed-by: Sagi Grimberg <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
-rw-r--r-- | drivers/nvme/host/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index e8070e3cc7c7..75565b5951d9 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -2081,7 +2081,7 @@ void nvme_stop_queues(struct nvme_ctrl *ctrl) queue_flag_set(QUEUE_FLAG_STOPPED, ns->queue); spin_unlock_irq(ns->queue->queue_lock); - blk_mq_stop_hw_queues(ns->queue); + blk_mq_quiesce_queue(ns->queue); } mutex_unlock(&ctrl->namespaces_mutex); } |