Commit c1842f34 authored by Max Gurtovoy's avatar Max Gurtovoy Committed by Leon Romanovsky

IB/iser: open code iser_disconnected_handler

There is a single caller to iser_disconnected_handler. Open code its
logic and remove it.
Signed-off-by: default avatarMax Gurtovoy <mgurtovoy@nvidia.com>
Link: https://lore.kernel.org/r/20221016093833.12537-4-mgurtovoy@nvidia.comReviewed-by: default avatarSergey Gorenko <sergeygo@nvidia.com>
Reviewed-by: default avatarSagi Grimberg <sagi@grimberg.me>
Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
parent a75243ae
......@@ -651,19 +651,6 @@ static void iser_connected_handler(struct rdma_cm_id *cma_id,
complete(&iser_conn->up_completion);
}
static void iser_disconnected_handler(struct rdma_cm_id *cma_id)
{
struct iser_conn *iser_conn = cma_id->context;
if (iser_conn_terminate(iser_conn)) {
if (iser_conn->iscsi_conn)
iscsi_conn_failure(iser_conn->iscsi_conn,
ISCSI_ERR_CONN_FAILED);
else
iser_err("iscsi_iser connection isn't bound\n");
}
}
/*
* Called with state mutex held
*/
......@@ -678,7 +665,13 @@ static void iser_cleanup_handler(struct rdma_cm_id *cma_id,
* by now, call it here to be safe that we handle CM drep
* and flush errors.
*/
iser_disconnected_handler(cma_id);
if (iser_conn_terminate(iser_conn)) {
if (iser_conn->iscsi_conn)
iscsi_conn_failure(iser_conn->iscsi_conn,
ISCSI_ERR_CONN_FAILED);
else
iser_err("iscsi_iser connection isn't bound\n");
}
iser_free_ib_conn_res(iser_conn, destroy);
complete(&iser_conn->ib_completion);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment