Skip to content

Commit 63bcf90

Browse files
Hannes Reineckekeithbusch
authored andcommitted
nvme-multipath: system fails to create generic nvme device
NVME_NSHEAD_DISK_LIVE is a flag for struct nvme_ns_head, not nvme_ns. The current code has a typo causing NVME_NSHEAD_DISK_LIVE never to be cleared once device_add_disk_fails, causing the system never to create the 'generic' character device. Even several rescan attempts will change the situation and the system has to be rebooted to fix the issue. Fixes: 1138458 ("nvme-multipath: add error handling support for add_disk()") Signed-off-by: Hannes Reinecke <hare@kernel.org> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <kbusch@kernel.org>
1 parent 65f666c commit 63bcf90

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/nvme/host/multipath.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ static void nvme_mpath_set_live(struct nvme_ns *ns)
648648
rc = device_add_disk(&head->subsys->dev, head->disk,
649649
nvme_ns_attr_groups);
650650
if (rc) {
651-
clear_bit(NVME_NSHEAD_DISK_LIVE, &ns->flags);
651+
clear_bit(NVME_NSHEAD_DISK_LIVE, &head->flags);
652652
return;
653653
}
654654
nvme_add_ns_head_cdev(head);

0 commit comments

Comments
 (0)