Commit b2b2de7c authored by Keith Busch's avatar Keith Busch Committed by Jens Axboe

nvme: revalidate after verifying identifiers

If the namespace identifiers have changed, skip updating the disk
information, as that will register parameters from a mismatched
namespace.
Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
Reviewed-by: default avatarSagi Grimberg <sagi@grimberg.me>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent b2ce4d90
......@@ -1936,7 +1936,6 @@ static int nvme_revalidate_disk(struct gendisk *disk)
goto free_id;
}
__nvme_revalidate_disk(disk, id);
ret = nvme_report_ns_ids(ctrl, ns->head->ns_id, id, &ids);
if (ret)
goto free_id;
......@@ -1945,8 +1944,10 @@ static int nvme_revalidate_disk(struct gendisk *disk)
dev_err(ctrl->device,
"identifiers changed for nsid %d\n", ns->head->ns_id);
ret = -ENODEV;
goto free_id;
}
__nvme_revalidate_disk(disk, id);
free_id:
kfree(id);
out:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment