aboutsummaryrefslogtreecommitdiffstats
path: root/net/netlink
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2008-01-28 17:41:19 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:08:07 -0500
commitb7c6ba6eb1234e35a74fb8ba8123232a7b1ba9e4 (patch)
tree672c08c95229a6ac242ab12a5195dceddb0f3127 /net/netlink
parent4f84d82f7a623f8641af2574425c329431ff158f (diff)
[NETNS]: Consolidate kernel netlink socket destruction.
Create a specific helper for netlink kernel socket disposal. This just let the code look better and provides a ground for proper disposal inside a namespace. Signed-off-by: Denis V. Lunev <den@openvz.org> Tested-by: Alexey Dobriyan <adobriyan@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netlink')
-rw-r--r--net/netlink/af_netlink.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 29fef558aab6..626a58206298 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1405,6 +1405,17 @@ out_sock_release:
1405} 1405}
1406EXPORT_SYMBOL(netlink_kernel_create); 1406EXPORT_SYMBOL(netlink_kernel_create);
1407 1407
1408
1409void
1410netlink_kernel_release(struct sock *sk)
1411{
1412 if (sk == NULL || sk->sk_socket == NULL)
1413 return;
1414 sock_release(sk->sk_socket);
1415}
1416EXPORT_SYMBOL(netlink_kernel_release);
1417
1418
1408/** 1419/**
1409 * netlink_change_ngroups - change number of multicast groups 1420 * netlink_change_ngroups - change number of multicast groups
1410 * 1421 *