aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
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
parent320a382746e0ab1304476ea7e986a8d416ab99db (diff)
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')
-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 e44350de8a21..0e9c5dcb2bd7 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)
1172 if (result < 0) 1172 if (result < 0)
1173 goto release_sq; 1173 goto release_sq;
1174 1174
1175 spin_lock(&nvmeq->q_lock); 1175 spin_lock_irq(&nvmeq->q_lock);
1176 nvme_init_queue(nvmeq, qid); 1176 nvme_init_queue(nvmeq, qid);
1177 spin_unlock(&nvmeq->q_lock); 1177 spin_unlock_irq(&nvmeq->q_lock);
1178 1178
1179 return result; 1179 return result;
1180 1180
@@ -1290,9 +1290,9 @@ static int nvme_configure_admin_queue(struct nvme_dev *dev)
1290 if (result) 1290 if (result)
1291 return result; 1291 return result;
1292 1292
1293 spin_lock(&nvmeq->q_lock); 1293 spin_lock_irq(&nvmeq->q_lock);
1294 nvme_init_queue(nvmeq, 0); 1294 nvme_init_queue(nvmeq, 0);
1295 spin_unlock(&nvmeq->q_lock); 1295 spin_unlock_irq(&nvmeq->q_lock);
1296 return result; 1296 return result;
1297} 1297}
1298 1298
@@ -1836,9 +1836,9 @@ static int nvme_setup_io_queues(struct nvme_dev *dev)
1836 for (i = dev->queue_count - 1; i > nr_io_queues; i--) { 1836 for (i = dev->queue_count - 1; i > nr_io_queues; i--) {
1837 struct nvme_queue *nvmeq = dev->queues[i]; 1837 struct nvme_queue *nvmeq = dev->queues[i];
1838 1838
1839 spin_lock(&nvmeq->q_lock); 1839 spin_lock_irq(&nvmeq->q_lock);
1840 nvme_cancel_ios(nvmeq, false); 1840 nvme_cancel_ios(nvmeq, false);
1841 spin_unlock(&nvmeq->q_lock); 1841 spin_unlock_irq(&nvmeq->q_lock);
1842 1842
1843 nvme_free_queue(nvmeq); 1843 nvme_free_queue(nvmeq);
1844 dev->queue_count--; 1844 dev->queue_count--;