nvmf: Make tx_desc free correct in nvmf_recv

Should set tx_desc=NULL here. If not,When
nvmf_post_rdma_recv(conn, rx_desc) fails,
we would make tx_desc deactive again, and
this is wrong.

Change-Id: Ieabc7e3864b7f124b003d052f66ab8799a1d632e
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
This commit is contained in:
Ziye Yang 2016-06-16 15:34:19 +08:00 committed by Daniel Verkamp
parent 8be572ef20
commit 78b69710f3

View File

@ -1062,6 +1062,7 @@ static int nvmf_recv(struct spdk_nvmf_conn *conn, struct ibv_wc *wc)
if (ret == 1) {
tx_desc->rx_desc = NULL;
nvmf_deactive_tx_desc(tx_desc);
tx_desc = NULL;
if (nvmf_post_rdma_recv(conn, rx_desc)) {
SPDK_ERRLOG("Unable to re-post aq rx descriptor\n");
goto recv_error;