nvmf: add the assert in ctrlr_delete_qpair

Change-Id: I4c23f83ebaf80f1b62fb4c1144ff864bdfd6efbe
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/406014
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Ziye Yang 2018-04-02 10:23:19 +08:00 committed by Jim Harris
parent f0979076d6
commit 6d4e6ffd08

View File

@ -287,6 +287,8 @@ ctrlr_delete_qpair(void *ctx)
spdk_nvmf_transport_qpair_fini(qpair);
if (ctrlr->num_qpairs == 0) {
assert(ctrlr->subsys != NULL);
assert(ctrlr->subsys->thread != NULL);
spdk_thread_send_msg(ctrlr->subsys->thread, ctrlr_destruct, ctrlr);
}
}