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: Ziye Yang <optimistyzy@gmail.com> Reviewed-on: https://review.gerrithub.io/414565 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
parent
7352fd62d8
commit
9f697e0fe2
@ -179,9 +179,7 @@ nvmf_tgt_create_poll_group(void *ctx)
|
|||||||
assert(pg != NULL);
|
assert(pg != NULL);
|
||||||
|
|
||||||
pg->group = spdk_nvmf_poll_group_create(g_spdk_nvmf_tgt);
|
pg->group = spdk_nvmf_poll_group_create(g_spdk_nvmf_tgt);
|
||||||
if (pg->group == NULL) {
|
assert(pg->group != NULL);
|
||||||
SPDK_ERRLOG("Failed to create poll group for core %u\n", spdk_env_get_current_core());
|
|
||||||
}
|
|
||||||
|
|
||||||
g_active_poll_groups++;
|
g_active_poll_groups++;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user