Do not call disk_create() until we have completed all initialization of our
internal disk structure. Sponsored by: Intel Reviewed by: carl MFC after: 3 days
This commit is contained in:
parent
da24cfcb35
commit
c3e9dd893b
@ -318,8 +318,6 @@ nvd_new_disk(struct nvme_namespace *ns, void *ctrlr_arg)
|
||||
min(sizeof(disk->d_descr), NVME_MODEL_NUMBER_LENGTH));
|
||||
#endif
|
||||
|
||||
disk_create(disk, DISK_VERSION);
|
||||
|
||||
ndisk->ns = ns;
|
||||
ndisk->disk = disk;
|
||||
ndisk->cur_depth = 0;
|
||||
@ -335,6 +333,8 @@ nvd_new_disk(struct nvme_namespace *ns, void *ctrlr_arg)
|
||||
TAILQ_INSERT_TAIL(&disk_head, ndisk, global_tailq);
|
||||
TAILQ_INSERT_TAIL(&ctrlr->disk_head, ndisk, ctrlr_tailq);
|
||||
|
||||
disk_create(disk, DISK_VERSION);
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user