@@ -542,28 +542,7 @@ void siw_qp_cm_drop(struct siw_qp *qp, int schedule)
siw_dbg_cep(cep, "immediate close, state %d\n", cep->state);
__siw_cep_terminate_upcall(cep, -EINVAL);
-
- if (cep->cm_id) {
- cep->cm_id->rem_ref(cep->cm_id);
- cep->cm_id = NULL;
- }
- cep->state = SIW_EPSTATE_CLOSED;
-
- if (cep->sock) {
- siw_socket_disassoc(cep->sock);
- /*
- * Immediately close socket
- */
- sock_release(cep->sock);
- cep->sock = NULL;
- }
- if (cep->qp) {
- BUG_ON(cep->qp->cep != cep);
- cep->qp->cep = NULL;
- siw_qp_put(cep->qp);
- cep->qp = NULL;
- siw_cep_put(cep);
- }
+ __siw_cep_close(cep);
out:
siw_cep_set_free(cep);
}
Now that the logic is identical we better use the common function in order to avoid future problems. Fixes: 6c52fdc244b5 ("rdma/siw: connection management") Signed-off-by: Stefan Metzmacher <metze@samba.org> Cc: Bernard Metzler <bmt@zurich.ibm.com> Cc: linux-rdma@vger.kernel.org --- drivers/infiniband/sw/siw/siw_cm.c | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-)