From: Irvin Cote Date: Thu, 18 May 2023 22:10:54 +0000 (-0300) Subject: nvme-core: use nvme_ns_head_multipath instead of ns->head->disk X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=35e797b0246b49d116326ff23c2dbfd6507168a5;p=linux.git nvme-core: use nvme_ns_head_multipath instead of ns->head->disk Change the way we check for a multipath nshead so as to consistently use the same check to assert the same condition. Signed-off-by: Irvin Cote Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch --- diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 64c484c14d6fa..afd2e4a41aab3 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -3664,7 +3664,7 @@ static void nvme_alloc_ns(struct nvme_ctrl *ctrl, struct nvme_ns_info *info) * instance as shared namespaces will show up as multiple block * devices. */ - if (ns->head->disk) { + if (nvme_ns_head_multipath(ns->head)) { sprintf(disk->disk_name, "nvme%dc%dn%d", ctrl->subsys->instance, ctrl->instance, ns->head->instance); disk->flags |= GENHD_FL_HIDDEN;