lib/iscsi: Add a check for poll_group

If this polling group is not initialized, we do not
need to destroy the polling group.

Change-Id: I5a94412d7f42b05d4a457c8652e2f465190fbe6e
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/401362
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Ziye Yang 2018-02-27 09:28:31 +08:00 committed by Jim Harris
parent 9364bee419
commit 51029af4d7

View File

@ -986,7 +986,11 @@ spdk_iscsi_fini_done(void *arg)
void
spdk_shutdown_iscsi_conns_done(void)
{
spdk_for_each_thread(iscsi_unregister_poll_group, NULL, spdk_iscsi_fini_done);
if (g_spdk_iscsi.poll_group) {
spdk_for_each_thread(iscsi_unregister_poll_group, NULL, spdk_iscsi_fini_done);
} else {
spdk_iscsi_fini_done(NULL);
}
}
void