summaryrefslogtreecommitdiffstats
path: root/drivers/nvme/host/core.c
diff options
context:
space:
mode:
authorSagi Grimberg <sagi@grimberg.me>2017-12-21 15:07:27 +0200
committerChristoph Hellwig <hch@lst.de>2017-12-29 10:32:58 +0100
commit479a322fb729d657d34706ccf8dd12916f36628f (patch)
treed048b15739f2cffd4ab5487c0fb348378692793d /drivers/nvme/host/core.c
parentd5bf4b7f437c250821d40c3e32158729e6b484ce (diff)
downloadlinux-479a322fb729d657d34706ccf8dd12916f36628f.tar.bz2
nvme-mpath: fix last path removal during traffic
In case our last path is removed during traffic, we can end up requeueing the bio(s) but never schedule the actual requeue work as upper layers still have open handles on the mpath device node. Fix this by scheduling requeue work if the namespace being removed is the last path in the ns_head path list. Fixes: 32acab3181c7 ("nvme: implement multipath access to nvme subsystems") Signed-off-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme/host/core.c')
-rw-r--r--drivers/nvme/host/core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 961d6a4af19c..839650e0926a 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -2991,6 +2991,7 @@ static void nvme_ns_remove(struct nvme_ns *ns)
mutex_unlock(&ns->ctrl->namespaces_mutex);
synchronize_srcu(&ns->head->srcu);
+ nvme_mpath_check_last_path(ns);
nvme_put_ns(ns);
}