Removed unnecessary sock_hold() when a CM_REJECT arrives before TCP_ESTABLISHED state.
This happend in the server side when after getting CM_REQ and answering with CM_REP a CM_REJ
arrived.
The sock_hold that was removed assumed that there will be a timewait state - but according to
the spec, the state changes back to LISTEN without TIMEWAIT.
Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
sdp_dbg(sk, "%s event %d handled\n", __func__, event->event);
if (rc && sdp_sk(sk)->id == id) {
- if (sk->sk_state == TCP_SYN_RECV) {
- /* sdp_close() will not be called therefore we need
- to take a refernce till infiniband teardown is
- finished */
- sock_hold(sk, SOCK_REF_CM_TW);
- }
child = sk;
sdp_sk(sk)->id = NULL;
id->qp = NULL;