Skip to content

Commit

Permalink
Target/iser: Avoid calling rdma_disconnect twice
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sagi Grimberg authored and Nicholas Bellinger committed Sep 15, 2014
1 parent 0fc4ea7 commit 38a8316
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/infiniband/ulp/isert/ib_isert.c
Original file line number Diff line number Diff line change
Expand Up @@ -3215,7 +3215,7 @@ static void isert_wait_conn(struct iscsi_conn *conn)
pr_debug("isert_wait_conn: Starting \n");

mutex_lock(&isert_conn->conn_mutex);
if (isert_conn->conn_cm_id) {
if (isert_conn->conn_cm_id && !isert_conn->disconnect) {
pr_debug("Calling rdma_disconnect from isert_wait_conn\n");
rdma_disconnect(isert_conn->conn_cm_id);
}
Expand Down

0 comments on commit 38a8316

Please sign in to comment.