Commit 6e4e85dc authored by Shuhei Matsumoto's avatar Shuhei Matsumoto Committed by Tomasz Zawadzki
Browse files

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: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9f83569becfc6e9440fb859709f04b6123674f25
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/474438


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent cabbe1b1
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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);
		}
	}
}