]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
nvme: split dev_list_lock
authorMing Lin <ming.l@ssi.samsung.com>
Wed, 10 Feb 2016 18:03:31 +0000 (10:03 -0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 1 Jun 2017 20:41:00 +0000 (13:41 -0700)
Split dev_list_lock into one in the core and one in the PCI driver.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Ming Lin <ming.l@ssi.samsung.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
(cherry picked from commit 9f2482b91bcd02ac2999cf04b3fb1b89e1c4d559)

Orabug: 25130845

Signed-off-by: Ashok Vairavan <ashok.vairavan@oracle.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/nvme/host/core.c
drivers/nvme/host/nvme.h
drivers/nvme/host/pci.c

index 6813c143a82b0701dfe7997c020b5b02bdbb9ac2..614739ec56448a4f0c53fcba30e2b73927646f57 100644 (file)
@@ -52,7 +52,7 @@ static int nvme_char_major;
 module_param(nvme_char_major, int, 0);
 
 static LIST_HEAD(nvme_ctrl_list);
-DEFINE_SPINLOCK(dev_list_lock);
+static DEFINE_SPINLOCK(dev_list_lock);
 
 static struct class *nvme_class;
 
index e54bedf1c089b84252026a7360d5b7426dbf9f97..8b8ef9bdf4d637b0460401cb3c955c60877ac881 100644 (file)
@@ -259,8 +259,6 @@ int nvme_set_features(struct nvme_ctrl *dev, unsigned fid, unsigned dword11,
                        dma_addr_t dma_addr, u32 *result);
 int nvme_set_queue_count(struct nvme_ctrl *ctrl, int *count);
 
-extern spinlock_t dev_list_lock;
-
 struct sg_io_hdr;
 
 int nvme_sg_io(struct nvme_ns *ns, struct sg_io_hdr __user *u_hdr);
index ad3a752bcd6033e4ae6bab233ce5da78c466e036..135059ed5db953ea27bd2c42c0d897997aee3be4 100644 (file)
@@ -72,6 +72,7 @@ module_param(nvme_io_queues, uint, 0);
 MODULE_PARM_DESC(nvme_io_queues, "set the number of nvme io queues");
 
 static LIST_HEAD(dev_list);
+static DEFINE_SPINLOCK(dev_list_lock);
 static struct task_struct *nvme_thread;
 static struct workqueue_struct *nvme_workq;
 static wait_queue_head_t nvme_kthread_wait;