]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tipc: create group member event messages when they are needed
authorJon Maloy <jon.maloy@ericsson.com>
Mon, 8 Jan 2018 20:03:26 +0000 (21:03 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 9 Jan 2018 17:35:57 +0000 (12:35 -0500)
commit7ad32bcb7855ae8a60a8cf98e1b9da77cfdba4d0
treeda31cea7f49f2793e536b42da165cea1caf00a1d
parent0233493a5fad227645f7f02539cb42db72e76030
tipc: create group member event messages when they are needed

In the current implementation, a group socket receiving topology
events about other members just converts the topology event message
into a group event message and stores it until it reaches the right
state to issue it to the user. This complicates the code unnecessarily,
and becomes impractical when we in the coming commits will need to
create and issue membership events independently.

In this commit, we change this so that we just notice the type and
origin of the incoming topology event, and then drop the buffer. Only
when it is time to actually send a group event to the user do we
explicitly create a new message and send it upwards.

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