mirror of
https://github.com/torvalds/linux.git
synced 2024-11-18 10:01:43 +00:00
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 <guoqing.jiang@ionos.com> Reviewed-by: Danil Kipnis <danil.kipnis@ionos.com> Signed-off-by: Gioh Kim <gi-oh.kim@ionos.com> Signed-off-by: Jack Wang <jinpu.wang@ionos.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
This commit is contained in:
parent
4cd5261df9
commit
57dae8baa6
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user