summaryrefslogtreecommitdiffstats
path: root/drivers/block/nvme-core.c
diff options
context:
space:
mode:
authorMatthew Wilcox <willy@linux.intel.com>2013-10-15 15:01:10 -0400
committerMatthew Wilcox <matthew.r.wilcox@intel.com>2013-12-16 15:54:34 -0500
commit0a8d44cb33377969337fa6c1961b631605d5f453 (patch)
tree058e3a4a2f903b0aca5952708512d50a9ac3bb0e /drivers/block/nvme-core.c
parent320a382746e0ab1304476ea7e986a8d416ab99db (diff)
downloadop-kernel-dev-0a8d44cb33377969337fa6c1961b631605d5f453.zip
op-kernel-dev-0a8d44cb33377969337fa6c1961b631605d5f453.tar.gz
NVMe: Fix lockdep warnings
During the initialisation path, the queue lock is taken without interrupt protection. It's perfectly safe to do so, because the interrupt handler can't run at this point, but it confuses lockdep. Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
Diffstat (limited to 'drivers/block/nvme-core.c')
-rw-r--r--drivers/block/nvme-core.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c
index e44350d..0e9c5dc 100644
--- a/drivers/block/nvme-core.c
+++ b/drivers/block/nvme-core.c
@@ -1172,9 +1172,9 @@ static int nvme_create_queue(struct nvme_queue *nvmeq, int qid)
if (result < 0)
goto release_sq;
- spin_lock(&nvmeq->q_lock);
+ spin_lock_irq(&nvmeq->q_lock);
nvme_init_queue(nvmeq, qid);
- spin_unlock(&nvmeq->q_lock);
+ spin_unlock_irq(&nvmeq->q_lock);
return result;
@@ -1290,9 +1290,9 @@ static int nvme_configure_admin_queue(struct nvme_dev *dev)
if (result)
return result;
- spin_lock(&nvmeq->q_lock);
+ spin_lock_irq(&nvmeq->q_lock);
nvme_init_queue(nvmeq, 0);
- spin_unlock(&nvmeq->q_lock);
+ spin_unlock_irq(&nvmeq->q_lock);
return result;
}
@@ -1836,9 +1836,9 @@ static int nvme_setup_io_queues(struct nvme_dev *dev)
for (i = dev->queue_count - 1; i > nr_io_queues; i--) {
struct nvme_queue *nvmeq = dev->queues[i];
- spin_lock(&nvmeq->q_lock);
+ spin_lock_irq(&nvmeq->q_lock);
nvme_cancel_ios(nvmeq, false);
- spin_unlock(&nvmeq->q_lock);
+ spin_unlock_irq(&nvmeq->q_lock);
nvme_free_queue(nvmeq);
dev->queue_count--;
OpenPOWER on IntegriCloud