OSDN Git Service

tipc: remove tsk->connected from tipc_sock
authorParthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
Tue, 1 Nov 2016 13:02:40 +0000 (14:02 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 1 Nov 2016 15:53:24 +0000 (11:53 -0400)
commitd6fb7e9c9946578667283805b9a73f318e3a0554
tree2270e200a2550c081f3c2b5eae1c2d29f5b224a9
parent87227fe7e42060af9bc8977fc17427e7c9cadb5d
tipc: remove tsk->connected from tipc_sock

Until now, we determine if a socket is connected or not based on
tsk->connected, which is set once when the probing state is set
to TIPC_CONN_OK. It is unset when the sock->state is updated from
SS_CONNECTED to any other state.

In this commit, we remove connected variable from tipc_sock and
derive socket connection status from the following condition:
sock->state == SS_CONNECTED => tsk->connected

There is no functional change in this commit.

Acked-by: Ying Xue <ying.xue@windriver.com>
Acked-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/socket.c