summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@sandisk.com>2016-10-28 17:23:19 -0700
committerJens Axboe <axboe@fb.com>2016-11-02 12:50:19 -0600
commit3174dd33fa8316d29f238f093291ca9bb25e6f58 (patch)
treef4f2d0c3dc750d6de882b5a32867edeb51249edc
parent7b17c2f7292ba1f3f98dae3f7077f9e569653276 (diff)
downloadlinux-3174dd33fa8316d29f238f093291ca9bb25e6f58.tar.bz2
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 <bart.vanassche@sandisk.com> Cc: Keith Busch <keith.busch@intel.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
-rw-r--r--drivers/nvme/host/core.c2
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);
}