Commit 9a6a5611 authored by Ziye Yang's avatar Ziye Yang Committed by Tomasz Zawadzki
Browse files

lib/iscsi: Change the order of executing iscsi_clear_all_transfer_task



In my mind, we should firstly remove the sock from the group, then
all the call_cb of pdus will be handled, then we clear the task,
we can avoid the duplicated resource recycling.

Signed-off-by: default avatarZiye Yang <ziye.yang@intel.com>
Change-Id: Ic5fad130e58c9dcb42a237973979b042eabdf43a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3309


Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
parent 8e65bfc7
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -665,10 +665,9 @@ _iscsi_conn_destruct(struct spdk_iscsi_conn *conn)
{
	int rc;

	iscsi_clear_all_transfer_task(conn, NULL, NULL);

	iscsi_poll_group_remove_conn(conn->pg, conn);
	spdk_sock_close(&conn->sock);
	iscsi_clear_all_transfer_task(conn, NULL, NULL);
	spdk_poller_unregister(&conn->logout_request_timer);
	spdk_poller_unregister(&conn->logout_timer);