nvmf: clean up nvmf_recv() error path
If spdk_nvmf_request_exec() fails, the connection will be closed anyway, so just leave the tx_desc in the active array; it will be cleaned up in the normal connection cleanup path. Change-Id: Ie4f60bd6001658403dd7e1c6a47d40be756ef6f2 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
3d9ef1a94e
commit
d63007e5ca
@ -1176,21 +1176,17 @@ nvmf_recv(struct spdk_nvmf_conn *conn, struct ibv_wc *wc)
|
|||||||
ret = spdk_nvmf_request_exec(req);
|
ret = spdk_nvmf_request_exec(req);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
SPDK_ERRLOG("Command execution failed\n");
|
SPDK_ERRLOG("Command execution failed\n");
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
} else if (ret > 0) {
|
|
||||||
/*
|
return 0;
|
||||||
* Pending transfer from host to controller; command will continue
|
|
||||||
* once transfer is complete.
|
|
||||||
*/
|
|
||||||
ret = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret < 0) {
|
/*
|
||||||
/* recover the tx_desc */
|
* Pending transfer from host to controller; command will continue
|
||||||
nvmf_deactive_tx_desc(tx_desc);
|
* once transfer is complete.
|
||||||
}
|
*/
|
||||||
|
return 0;
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
Loading…
Reference in New Issue
Block a user