Skip to content

Commit

Permalink
nvme: Fix a race condition related to stopping queues
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bart Van Assche authored and Jens Axboe committed Nov 2, 2016
1 parent 7b17c2f commit 3174dd3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/nvme/host/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 3174dd3

Please sign in to comment.