nvme/tcp: solve the adminq is not created issue.
If the adminq is not created, we should call nvme_transport_ctrlr_destruct (i.e., nvme_tcp_ctrlr_destruct in tcp transport). Change-Id: If2362c47ac89fd80289ddd8402cf9f74d7bb5801 Signed-off-by: Ziye Yang <optimistyzy@gmail.com> Reviewed-on: https://review.gerrithub.io/436613 Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
20c69bbc30
commit
b7b2c972c9
@ -1769,7 +1769,7 @@ struct spdk_nvme_ctrlr *nvme_tcp_ctrlr_construct(const struct spdk_nvme_transpor
|
|||||||
|
|
||||||
rc = nvme_ctrlr_construct(&tctrlr->ctrlr);
|
rc = nvme_ctrlr_construct(&tctrlr->ctrlr);
|
||||||
if (rc != 0) {
|
if (rc != 0) {
|
||||||
nvme_ctrlr_destruct(&tctrlr->ctrlr);
|
free(tctrlr);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1777,7 +1777,7 @@ struct spdk_nvme_ctrlr *nvme_tcp_ctrlr_construct(const struct spdk_nvme_transpor
|
|||||||
SPDK_NVMF_MIN_ADMIN_QUEUE_ENTRIES, 0, SPDK_NVMF_MIN_ADMIN_QUEUE_ENTRIES);
|
SPDK_NVMF_MIN_ADMIN_QUEUE_ENTRIES, 0, SPDK_NVMF_MIN_ADMIN_QUEUE_ENTRIES);
|
||||||
if (!tctrlr->ctrlr.adminq) {
|
if (!tctrlr->ctrlr.adminq) {
|
||||||
SPDK_ERRLOG("failed to create admin qpair\n");
|
SPDK_ERRLOG("failed to create admin qpair\n");
|
||||||
nvme_ctrlr_destruct(&tctrlr->ctrlr);
|
nvme_tcp_ctrlr_destruct(&tctrlr->ctrlr);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user