* [PATCH 1/1] nvmet: fix error flow during ns enable
@ 2019-03-28 10:54 Max Gurtovoy
2019-03-28 14:48 ` Christoph Hellwig
0 siblings, 1 reply; 2+ messages in thread
From: Max Gurtovoy @ 2019-03-28 10:54 UTC (permalink / raw)
In case we fail to enable p2pmem on the current namespace, disable the
backing store device before exiting.
Cc: Stephen Bates <sbates at raithlin.com>
Signed-off-by: Max Gurtovoy <maxg at mellanox.com>
---
drivers/nvme/target/core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c
index 2d73b66..b3e765a 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 @@ int nvmet_ns_enable(struct nvmet_ns *ns)
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;
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 1/1] nvmet: fix error flow during ns enable
2019-03-28 10:54 [PATCH 1/1] nvmet: fix error flow during ns enable Max Gurtovoy
@ 2019-03-28 14:48 ` Christoph Hellwig
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2019-03-28 14:48 UTC (permalink / raw)
Thanks,
applied to nvme-5.1.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-03-28 14:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-28 10:54 [PATCH 1/1] nvmet: fix error flow during ns enable Max Gurtovoy
2019-03-28 14:48 ` Christoph Hellwig
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.