aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp
diff options
context:
space:
mode:
authorSagi Grimberg <sagig@mellanox.com>2014-07-02 09:19:26 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2014-09-15 17:02:30 -0400
commit38a8316b5d80ddee071d493bae567185c07de359 (patch)
treeaf8a207e66b220edb57aa2a6b8d27bba6a9c490d /drivers/infiniband/ulp
parent0fc4ea701fcf5bc51ace4e288af5be741465f776 (diff)
Target/iser: Avoid calling rdma_disconnect twice
rdma_disconnect may be called in 2 code flows: - isert_wait_conn: disconnect initiated be the target - disconnected_handler: disconnect invoked by the initiator In case isert_conn->disconnect is true then rdma_disconnect was called in disconnected handler, no need to call it again from isert_wait_conn. Signed-off-by: Sagi Grimberg <sagig@mellanox.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/infiniband/ulp')
-rw-r--r--drivers/infiniband/ulp/isert/ib_isert.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c
index 9959cd1faad9..9e21747acce6 100644
--- a/drivers/infiniband/ulp/isert/ib_isert.c
+++ b/drivers/infiniband/ulp/isert/ib_isert.c
@@ -3215,7 +3215,7 @@ static void isert_wait_conn(struct iscsi_conn *conn)
3215 pr_debug("isert_wait_conn: Starting \n"); 3215 pr_debug("isert_wait_conn: Starting \n");
3216 3216
3217 mutex_lock(&isert_conn->conn_mutex); 3217 mutex_lock(&isert_conn->conn_mutex);
3218 if (isert_conn->conn_cm_id) { 3218 if (isert_conn->conn_cm_id && !isert_conn->disconnect) {
3219 pr_debug("Calling rdma_disconnect from isert_wait_conn\n"); 3219 pr_debug("Calling rdma_disconnect from isert_wait_conn\n");
3220 rdma_disconnect(isert_conn->conn_cm_id); 3220 rdma_disconnect(isert_conn->conn_cm_id);
3221 } 3221 }