VSOCK: Don't set sk_state to TCP_CLOSE before testing it
authorJorgen Hansen <jhansen@vmware.com>
Mon, 27 Nov 2017 13:29:32 +0000 (05:29 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 28 Nov 2017 21:01:50 +0000 (16:01 -0500)
commit4a5def7f6a758aef1a0a3b10e981881c1e914f69
tree6f9d3ba6b242b1dc490aaa7bdeadcb20f19d8d15
parent22dac9f1fdd576c1d03ba00f4a9db9a864a43a70
VSOCK: Don't set sk_state to TCP_CLOSE before testing it

A recent commit (3b4477d2dcf2) converted the sk_state to use
TCP constants. In that change, vmci_transport_handle_detach
was changed such that sk->sk_state was set to TCP_CLOSE before
we test whether it is TCP_SYN_SENT. This change moves the
sk_state change back to the original locations in that function.

Signed-off-by: Jorgen Hansen <jhansen@vmware.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/vmw_vsock/vmci_transport.c