summaryrefslogtreecommitdiff
path: root/drivers/nvme/target/core.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2019-03-28 11:20:53 -0600
committerJens Axboe <axboe@kernel.dk>2019-03-28 11:20:53 -0600
commit7bca889ee9297c3e208dee7c41aed7a56a880400 (patch)
tree530e42e14e8bc687563cd3f9743026eaa58fecd5 /drivers/nvme/target/core.c
parentdd08a8d9a66de4b54575c294a92630299f7e0fe7 (diff)
parenta536b49785759bf99465fdf6e248d34322123fcd (diff)
Merge branch 'nvme-5.1' of git://git.infradead.org/nvme into for-linusfor-linus-20190329
Pull NVMe fixes from Christoph: "A few accumulated small fixes: - fix an endianess misannotation that sneaked in this merge window in nvme-tcp (me) - fix nvme-loop to handle multi-page segments (Ming) - fix error handling in the nvmet configfs code (Max) - add a missing requeue point in the multipath code (Martin George)" * 'nvme-5.1' of git://git.infradead.org/nvme: nvmet: fix error flow during ns enable nvmet: fix building bvec from sg list nvme-multipath: relax ANA state check nvme-tcp: fix an endianess miss-annotation
Diffstat (limited to 'drivers/nvme/target/core.c')
-rw-r--r--drivers/nvme/target/core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c
index 2d73b66e3686..b3e765a95af8 100644
--- a/drivers/nvme/target/core.c
+++ b/drivers/nvme/target/core.c
@@ -509,7 +509,7 @@ int nvmet_ns_enable(struct nvmet_ns *ns)
ret = nvmet_p2pmem_ns_enable(ns);
if (ret)
- goto out_unlock;
+ goto out_dev_disable;
list_for_each_entry(ctrl, &subsys->ctrls, subsys_entry)
nvmet_p2pmem_ns_add_p2p(ctrl, ns);
@@ -550,7 +550,7 @@ out_unlock:
out_dev_put:
list_for_each_entry(ctrl, &subsys->ctrls, subsys_entry)
pci_dev_put(radix_tree_delete(&ctrl->p2p_ns_map, ns->nsid));
-
+out_dev_disable:
nvmet_ns_dev_disable(ns);
goto out_unlock;
}