From 3d8c12a16ff9882e1ce201db738b5e0a02150339 Mon Sep 17 00:00:00 2001 From: Shuhei Matsumoto Date: Mon, 11 Nov 2019 07:01:13 +0900 Subject: [PATCH] lib/iscsi: Remove duplicated freeping primary task for write I/O For large split write I/O, spdk_iscsi_task_cpl() does the same operations for the error case as the normal path. Hence remove duplicated operation in spdk_iscsi_conn_free_pdu(). This fixes the issue that the reference count of the primary write task goes negative. Signed-off-by: Shuhei Matsumoto Change-Id: I169d8932821f2a1c8e1f153347cd3175f1291bf1 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473818 Tested-by: SPDK CI Jenkins Reviewed-by: Ben Walker Reviewed-by: Jim Harris --- lib/iscsi/conn.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/iscsi/conn.c b/lib/iscsi/conn.c index c72bf857a..5474f0d69 100644 --- a/lib/iscsi/conn.c +++ b/lib/iscsi/conn.c @@ -335,8 +335,6 @@ spdk_iscsi_conn_free_pdu(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pd /* Free the primary task after the last subtask done */ spdk_iscsi_task_put(primary); } - } else { - spdk_iscsi_task_put(primary); } } }