From: Sagi Grimberg Date: Tue, 2 Dec 2014 14:57:17 +0000 (+0200) Subject: iscsi,iser-target: Initiate termination only once X-Git-Tag: omap-for-v3.20/drop-legacy-3517~16^2~31 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=954f23722b5753305be490330cf2680b7a25f4a3;p=pandora-kernel.git iscsi,iser-target: Initiate termination only once Since commit 0fc4ea701fcf ("Target/iser: Don't put isert_conn inside disconnected handler") we put the conn kref in isert_wait_conn, so we need .wait_conn to be invoked also in the error path. Introduce call to isert_conn_terminate (called under lock) which transitions the connection state to TERMINATING and calls rdma_disconnect. If the state is already teminating, just bail out back (temination started). Also, make sure to destroy the connection when getting a connect error event if didn't get to connected (state UP). Same for the handling of REJECTED and UNREACHABLE cma events. Squashed: iscsi-target: Add call to wait_conn in establishment error flow Reported-by: Slava Shwartsman Signed-off-by: Sagi Grimberg Cc: # v3.10+ Signed-off-by: Nicholas Bellinger --- Reading git-diff-tree failed