nvmf_tgt: read ret from spdk_nvmf_poll_group_add.
It is possible for spdk_nvmf_poll_group_add to fail. In this case we need to tear down the qpair in the same way that we do in the new_qpair function. Change-Id: I17abdec2646d2b7f9ed07c9b9b3e74d3d0991903 Signed-off-by: Seth Howell <seth.howell@intel.com> Reviewed-on: https://review.gerrithub.io/c/443472 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
145485769e
commit
c1e0bded59
@ -119,7 +119,10 @@ nvmf_tgt_poll_group_add(void *arg1, void *arg2)
|
||||
struct spdk_nvmf_qpair *qpair = arg1;
|
||||
struct nvmf_tgt_poll_group *pg = arg2;
|
||||
|
||||
spdk_nvmf_poll_group_add(pg->group, qpair);
|
||||
if (spdk_nvmf_poll_group_add(pg->group, qpair) != 0) {
|
||||
SPDK_ERRLOG("Unable to add the qpair to a poll group.\n");
|
||||
spdk_nvmf_qpair_disconnect(qpair, NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
/* Round robin selection of cores */
|
||||
|
Loading…
Reference in New Issue
Block a user