Commit 9f697e0f authored by Ziye Yang's avatar Ziye Yang Committed by Changpeng Liu
Browse files

nvmf: change judgement to assert



Reason: It should never fail, which should
comply with the logic in nvmf_tgt_destroy_poll_group.

For the current case, if the judement fails,
we still add the g_active_poll_groups, the logic
is not correct. And according to the analysis,
the poll group creation should not fail.

Change-Id: I408ee1e8099f709330b8a6ffd26cf27d6a549bed
Signed-off-by: default avatarZiye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/414565


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
parent 7352fd62
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -179,9 +179,7 @@ nvmf_tgt_create_poll_group(void *ctx)
	assert(pg != NULL);

	pg->group = spdk_nvmf_poll_group_create(g_spdk_nvmf_tgt);
	if (pg->group == NULL) {
		SPDK_ERRLOG("Failed to create poll group for core %u\n", spdk_env_get_current_core());
	}
	assert(pg->group != NULL);

	g_active_poll_groups++;
}