From 57dae8baa6388af4a1e9a58cb29f9c08375a09fa Mon Sep 17 00:00:00 2001 From: Guoqing Jiang Date: Thu, 25 Mar 2021 16:32:56 +0100 Subject: [PATCH] RDMA/rtrs: Cleanup the code in rtrs_srv_rdma_cm_handler Let these cases share the same path since all of them need to close session. Link: https://lore.kernel.org/r/20210325153308.1214057-11-gi-oh.kim@ionos.com Signed-off-by: Guoqing Jiang Reviewed-by: Danil Kipnis Signed-off-by: Gioh Kim Signed-off-by: Jack Wang Signed-off-by: Jason Gunthorpe --- drivers/infiniband/ulp/rtrs/rtrs-srv.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/infiniband/ulp/rtrs/rtrs-srv.c b/drivers/infiniband/ulp/rtrs/rtrs-srv.c index 37ba121564a2..9fe4ab1d66ab 100644 --- a/drivers/infiniband/ulp/rtrs/rtrs-srv.c +++ b/drivers/infiniband/ulp/rtrs/rtrs-srv.c @@ -1908,13 +1908,10 @@ static int rtrs_srv_rdma_cm_handler(struct rdma_cm_id *cm_id, case RDMA_CM_EVENT_UNREACHABLE: rtrs_err(s, "CM error (CM event: %s, err: %d)\n", rdma_event_msg(ev->event), ev->status); - close_sess(sess); - break; + fallthrough; case RDMA_CM_EVENT_DISCONNECTED: case RDMA_CM_EVENT_ADDR_CHANGE: case RDMA_CM_EVENT_TIMEWAIT_EXIT: - close_sess(sess); - break; case RDMA_CM_EVENT_DEVICE_REMOVAL: close_sess(sess); break; -- GitLab