lib/iscsi: Replace conn_free_pdu() by task_put() and put_pdu() in remove_acked_pdu()

Due to recent refinement of primary/secondary task management,
remove_acked_pdu() cannot use spdk_iscsi_conn_free_pdu(). As done
in iscsi_conn_free_tasks(), we can replace spdk_iscsi_conn_free_pdu()
by spdk_iscsi_task_put() and spdk_put_pdu() and we do that in this
patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9f83569becfc6e9440fb859709f04b6123674f25
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/474438
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Shuhei Matsumoto 2019-11-15 14:09:36 +09:00 committed by Tomasz Zawadzki
parent cabbe1b179
commit 6e4e85dcef

View File

@ -4571,7 +4571,10 @@ remove_acked_pdu(struct spdk_iscsi_conn *conn, uint32_t ExpStatSN)
stat_sn = from_be32(&pdu->bhs.stat_sn);
if (SN32_LT(stat_sn, conn->exp_statsn)) {
TAILQ_REMOVE(&conn->snack_pdu_list, pdu, tailq);
spdk_iscsi_conn_free_pdu(conn, pdu);
if (pdu->task) {
spdk_iscsi_task_put(pdu->task);
}
spdk_put_pdu(pdu);
}
}
}