]> git.karo-electronics.de Git - karo-tx-linux.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)
committerJens Axboe <axboe@fb.com>
Wed, 10 Feb 2016 21:22:36 +0000 (14:22 -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>
drivers/nvme/host/core.c
drivers/nvme/host/nvme.h
drivers/nvme/host/pci.c

index 0c0011b5e1b9c1ba0e39fb452861744d9a79b5b6..6eb42d24a5e979bac33fa7106274053de256e8bb 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 9f77386f7d1eb9147d9f8be1e0b59c00923c2844..63ba8a500ee13e13c8285fee73783cfa66020bce 100644 (file)
@@ -266,8 +266,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 53a99422d44d7309ed032478a9ce7c2c292d10c9..54e79c0359132ca78b2ebded7282a908d756d6d6 100644 (file)
@@ -65,6 +65,7 @@ module_param(use_cmb_sqes, bool, 0644);
 MODULE_PARM_DESC(use_cmb_sqes, "use controller's memory buffer for I/O SQes");
 
 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;