Skip to content

Commit

Permalink
nvme-multipath: also check for a disabled path if there is a single s…
Browse files Browse the repository at this point in the history
…ibling

When we have a singular list in nvme_round_robin_path() we still
need to check its validity.

Signed-off-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
  • Loading branch information
Hannes Reinecke authored and Christoph Hellwig committed Jul 9, 2019
1 parent ca7ae5c commit 2032d07
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/nvme/host/multipath.c
Original file line number Diff line number Diff line change
@@ -183,8 +183,11 @@ static struct nvme_ns *nvme_round_robin_path(struct nvme_ns_head *head,
{
struct nvme_ns *ns, *found, *fallback = NULL;

if (list_is_singular(&head->list))
if (list_is_singular(&head->list)) {
if (nvme_path_is_disabled(old))
return NULL;
return old;
}

for (ns = nvme_next_ns(head, old);
ns != old;

0 comments on commit 2032d07

Please sign in to comment.