Skip to content

Commit 35e797b

Browse files
i-cotekeithbusch
authored andcommitted
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 <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Keith Busch <[email protected]>
1 parent d97b411 commit 35e797b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/nvme/host/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3664,7 +3664,7 @@ static void nvme_alloc_ns(struct nvme_ctrl *ctrl, struct nvme_ns_info *info)
36643664
* instance as shared namespaces will show up as multiple block
36653665
* devices.
36663666
*/
3667-
if (ns->head->disk) {
3667+
if (nvme_ns_head_multipath(ns->head)) {
36683668
sprintf(disk->disk_name, "nvme%dc%dn%d", ctrl->subsys->instance,
36693669
ctrl->instance, ns->head->instance);
36703670
disk->flags |= GENHD_FL_HIDDEN;

0 commit comments

Comments
 (0)