summaryrefslogtreecommitdiffstats
path: root/net/tipc/Makefile
diff options
context:
space:
mode:
authorGhantaKrishnamurthy MohanKrishna <mohan.krishna.ghanta.krishnamurthy@ericsson.com>2018-03-21 14:37:43 +0100
committerDavid S. Miller <davem@davemloft.net>2018-03-22 19:43:29 +0100
commitdfde331e757fd792e1c9579b72a8370ca665e5ed (patch)
tree8d73600363456cc4a8ee35be3016efb5ad703821 /net/tipc/Makefile
parentMerge branch 'mlxsw-Update-supported-firmware-version' (diff)
downloadlinux-dfde331e757fd792e1c9579b72a8370ca665e5ed.tar.xz
linux-dfde331e757fd792e1c9579b72a8370ca665e5ed.zip
tipc: modify socket iterator for sock_diag
The current socket iterator function tipc_nl_sk_dump, handles socket locks and calls __tipc_nl_add_sk for each socket. To reuse this logic in sock_diag implementation, we do minor modifications to make these functions generic as described below. In this commit, we add a two new functions __tipc_nl_sk_walk, __tipc_nl_add_sk_info and modify tipc_nl_sk_dump, __tipc_nl_add_sk accordingly. In __tipc_nl_sk_walk we: 1. acquire and release socket locks 2. for each socket, execute the specified callback function In __tipc_nl_add_sk we: - Move the netlink attribute insertion to __tipc_nl_add_sk_info. tipc_nl_sk_dump calls tipc_nl_sk_walk with __tipc_nl_add_sk as argument. sock_diag will use these generic functions in a later commit. There is no functional change in this commit. Acked-by: Jon Maloy <jon.maloy@ericsson.com> Acked-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: GhantaKrishnamurthy MohanKrishna <mohan.krishna.ghanta.krishnamurthy@ericsson.com> Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/Makefile')
0 files changed, 0 insertions, 0 deletions