mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
nvme-multipath: Early exit if no path is available
[ Upstream commitd1bcf006a9] nvme_round_robin_path() should test if the return ns pointer is valid. nvme_next_ns() will return a NULL pointer if there is no path left. Fixes:75c10e7327("nvme-multipath: round-robin I/O policy") Signed-off-by: Daniel Wagner <dwagner@suse.de> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
cf7ed01e02
commit
c9e668a196
@@ -221,7 +221,7 @@ static struct nvme_ns *nvme_round_robin_path(struct nvme_ns_head *head,
|
||||
}
|
||||
|
||||
for (ns = nvme_next_ns(head, old);
|
||||
ns != old;
|
||||
ns && ns != old;
|
||||
ns = nvme_next_ns(head, ns)) {
|
||||
if (nvme_path_is_disabled(ns))
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user