]> xenbits.xensource.com Git - people/iwj/linux.git/commit
iscsi,iser-target: Initiate termination only once
authorSagi Grimberg <sagig@mellanox.com>
Tue, 2 Dec 2014 14:57:17 +0000 (16:57 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Jan 2015 16:18:58 +0000 (08:18 -0800)
commit1ef1fb791dfb83cdc1baaab5db4c06cb3e63ffbb
tree1b8447b354f3ca61d2758814f55859bc2ca44dbc
parent24d2683ee34ce75c48969b9b0fdce138e43e6d01
iscsi,iser-target: Initiate termination only once

commit 954f23722b5753305be490330cf2680b7a25f4a3 upstream.

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 <valyushash@gmail.com>
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/ulp/isert/ib_isert.c
drivers/infiniband/ulp/isert/ib_isert.h
drivers/target/iscsi/iscsi_target_login.c