From 6140f2d1477d63baba5c55c0695029e997557282 Mon Sep 17 00:00:00 2001 From: Ziye Yang Date: Wed, 28 Feb 2018 15:36:00 +0800 Subject: [PATCH] lib/iscsi: Refactor spdk_iscsi_conn_execute Purpose: To make the logic clear. Change-Id: I6176f359a23816b316e92b63ee2e5d5175ae7e7b Signed-off-by: Ziye Yang Reviewed-on: https://review.gerrithub.io/401772 Tested-by: SPDK Automated Test System Reviewed-by: Shuhei Matsumoto Reviewed-by: Jim Harris --- lib/iscsi/conn.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/iscsi/conn.c b/lib/iscsi/conn.c index b19b6ed46..2d922a996 100644 --- a/lib/iscsi/conn.c +++ b/lib/iscsi/conn.c @@ -1165,18 +1165,13 @@ spdk_iscsi_conn_execute(struct spdk_iscsi_conn *conn) return -1; } - if (conn->state == ISCSI_CONN_STATE_EXITING) { - goto conn_exit; - } - - spdk_iscsi_conn_handle_queued_datain_tasks(conn); - -conn_exit: if (conn->state == ISCSI_CONN_STATE_EXITING) { spdk_iscsi_conn_destruct(conn); return -1; } + spdk_iscsi_conn_handle_queued_datain_tasks(conn); + return 0; }