nvme: disable irqs in nvme_freeze_queues
authorChristoph Hellwig <hch@lst.de>
Thu, 7 May 2015 07:38:14 +0000 (09:38 +0200)
committerJens Axboe <axboe@fb.com>
Tue, 19 May 2015 15:13:06 +0000 (09:13 -0600)
The queue_lock needs to be taken with irqs disabled.  This is mostly
due to the old pre blk-mq usage pattern, but we've also picked it up
in most of the few places where we use the queue_lock with blk-mq.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/block/nvme-core.c

index 85b8036deaa3b7daaba5317ed746936a1f5183db..00e641937a8e1e9112d4f19656eaf4deaca9f7ee 100644 (file)
@@ -2585,9 +2585,9 @@ static void nvme_freeze_queues(struct nvme_dev *dev)
        list_for_each_entry(ns, &dev->namespaces, list) {
                blk_mq_freeze_queue_start(ns->queue);
 
-               spin_lock(ns->queue->queue_lock);
+               spin_lock_irq(ns->queue->queue_lock);
                queue_flag_set(QUEUE_FLAG_STOPPED, ns->queue);
-               spin_unlock(ns->queue->queue_lock);
+               spin_unlock_irq(ns->queue->queue_lock);
 
                blk_mq_cancel_requeue_work(ns->queue);
                blk_mq_stop_hw_queues(ns->queue);