nvmf: Do not set the error state of the qpair
Reason: I checked the code in different transport, the qpair is already freed, so we dot need to set any state. Change-Id: I3d78c259c3f79ea4426dc9408e5c3469bc171358 Signed-off-by: Ziye Yang <optimistyzy@gmail.com> Reviewed-on: https://review.gerrithub.io/437493 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
parent
c68c2d28c1
commit
9d11abfd0e
@ -654,8 +654,6 @@ spdk_nvmf_poll_group_add(struct spdk_nvmf_poll_group *group,
|
||||
qpair->group = group;
|
||||
spdk_nvmf_qpair_set_state(qpair, SPDK_NVMF_QPAIR_ACTIVATING);
|
||||
|
||||
TAILQ_INSERT_TAIL(&group->qpairs, qpair, link);
|
||||
|
||||
TAILQ_FOREACH(tgroup, &group->tgroups, link) {
|
||||
if (tgroup->transport == qpair->transport) {
|
||||
rc = spdk_nvmf_transport_poll_group_add(tgroup, qpair);
|
||||
@ -663,10 +661,10 @@ spdk_nvmf_poll_group_add(struct spdk_nvmf_poll_group *group,
|
||||
}
|
||||
}
|
||||
|
||||
/* We add the qpair to the group only it is succesfully added into the tgroup */
|
||||
if (rc == 0) {
|
||||
TAILQ_INSERT_TAIL(&group->qpairs, qpair, link);
|
||||
spdk_nvmf_qpair_set_state(qpair, SPDK_NVMF_QPAIR_ACTIVE);
|
||||
} else {
|
||||
spdk_nvmf_qpair_set_state(qpair, SPDK_NVMF_QPAIR_ERROR);
|
||||
}
|
||||
|
||||
return rc;
|
||||
|
Loading…
Reference in New Issue
Block a user