提交 57dae8ba 编写于 作者: G Guoqing Jiang 提交者: Jason Gunthorpe

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.comSigned-off-by: NGuoqing Jiang <guoqing.jiang@ionos.com>
Reviewed-by: NDanil Kipnis <danil.kipnis@ionos.com>
Signed-off-by: NGioh Kim <gi-oh.kim@ionos.com>
Signed-off-by: NJack Wang <jinpu.wang@ionos.com>
Signed-off-by: NJason Gunthorpe <jgg@nvidia.com>
上级 4cd5261d
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册