diff options
author | Ming Lin <ming.l@ssi.samsung.com> | 2016-02-10 18:03:31 (GMT) |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-02-10 21:22:36 (GMT) |
commit | 9f2482b91bcd02ac2999cf04b3fb1b89e1c4d559 (patch) | |
tree | 1771a4ecb198bf63271f081f0a3332830e718e7e /drivers/nvme/host | |
parent | ba0ba7d3e5266111ec865b0bf1ad48dd0e2a2314 (diff) | |
download | linux-9f2482b91bcd02ac2999cf04b3fb1b89e1c4d559.tar.xz |
nvme: split dev_list_lock
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>
Diffstat (limited to 'drivers/nvme/host')
-rw-r--r-- | drivers/nvme/host/core.c | 2 | ||||
-rw-r--r-- | drivers/nvme/host/nvme.h | 2 | ||||
-rw-r--r-- | drivers/nvme/host/pci.c | 1 |
3 files changed, 2 insertions, 3 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 0c0011b..6eb42d2 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -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; diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h index 9f77386..63ba8a5 100644 --- a/drivers/nvme/host/nvme.h +++ b/drivers/nvme/host/nvme.h @@ -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); diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index 53a9942..54e79c0 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -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; |