diff options
author | Max Gurtovoy <mgurtovoy@nvidia.com> | 2022-10-16 12:38:33 +0300 |
---|---|---|
committer | Leon Romanovsky <leon@kernel.org> | 2022-10-19 10:38:35 +0300 |
commit | c1842f34fceef47d6285e558004f8e2d6ed91b91 (patch) | |
tree | de6d017d07690d7e1e68ec72b87ff341c95b280e /drivers/infiniband/ulp | |
parent | a75243ae08d23272235cb26117464843538936b4 (diff) | |
download | linux-c1842f34fceef47d6285e558004f8e2d6ed91b91.tar.xz |
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: Max Gurtovoy <mgurtovoy@nvidia.com>
Link: https://lore.kernel.org/r/20221016093833.12537-4-mgurtovoy@nvidia.com
Reviewed-by: Sergey Gorenko <sergeygo@nvidia.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'drivers/infiniband/ulp')
-rw-r--r-- | drivers/infiniband/ulp/iser/iser_verbs.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/drivers/infiniband/ulp/iser/iser_verbs.c b/drivers/infiniband/ulp/iser/iser_verbs.c index f33e3a7f605d..1b8eda0dae4e 100644 --- a/drivers/infiniband/ulp/iser/iser_verbs.c +++ b/drivers/infiniband/ulp/iser/iser_verbs.c @@ -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); } |