aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nvme/host/nvme.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2015-12-24 15:27:00 +0100
committerJens Axboe <axboe@fb.com>2016-01-12 13:30:13 -0700
commit69d3b8ac15a5eb938e6a01909f6cc8ae4b5d3a17 (patch)
tree0c845f04ca4d0cc841e4ec215b932554231cc72b /drivers/nvme/host/nvme.h
parentnvme: Move nvme_freeze/unfreeze_queues to nvme core (diff)
downloadlinux-dev-69d3b8ac15a5eb938e6a01909f6cc8ae4b5d3a17.tar.xz
linux-dev-69d3b8ac15a5eb938e6a01909f6cc8ae4b5d3a17.zip
nvme: synchronize access to ctrl->namespaces
Currently traversal and modification of ctrl->namespaces happens completely unsynchronized, which can be fixed by the addition of a simple mutex. Note: nvme_dev_ioctl will be handled in the next patch. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Sagi Grimberg <sagig@mellanox.com> Acked-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/nvme/host/nvme.h')
-rw-r--r--drivers/nvme/host/nvme.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index 0da67474ce6d..44375923bd6a 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -69,6 +69,7 @@ struct nvme_ctrl {
int instance;
struct blk_mq_tag_set *tagset;
struct list_head namespaces;
+ struct mutex namespaces_mutex;
struct device *device; /* char device */
struct list_head node;