public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: ebiederm@xmission•com (Eric W. Biederman)
To: David Miller <davem@davemloft•net>
Cc: <netdev@vger•kernel.org>, "Serge E. Hallyn" <serge@hallyn•com>,
	Gao feng <gaofeng@cn•fujitsu.com>,
	pablo@netfilter•org, Stephen Hemminger <shemminger@vyatta•com>,
	Pavel Emelyanov <xemul@openvz•org>
Subject: [PATCH net-next 07/19] net ipv6: Remove unneded registration of an empty net/ipv6/neigh
Date: Thu, 19 Apr 2012 16:26:19 -0700	[thread overview]
Message-ID: <m18vhrgv6s.fsf@fess.ebiederm.org> (raw)
In-Reply-To: <m1aa27ia6h.fsf@fess.ebiederm.org> (Eric W. Biederman's message of "Thu, 19 Apr 2012 16:17:10 -0700")


sysctl no longer requires explicit creation of directories.  The neigh
directory is always populated with at least a default entry so this
should cause no user visible changes.

Signed-off-by: Eric W. Biederman <ebiederm@xmission•com>
---
 net/ipv6/af_inet6.c        |   15 ---------------
 net/ipv6/sysctl_net_ipv6.c |   27 ---------------------------
 2 files changed, 0 insertions(+), 42 deletions(-)

diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index 8ed1b93..461e789 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -1111,11 +1111,6 @@ static int __init inet6_init(void)
 	if (err)
 		goto out_sock_register_fail;
 
-#ifdef CONFIG_SYSCTL
-	err = ipv6_static_sysctl_register();
-	if (err)
-		goto static_sysctl_fail;
-#endif
 	tcpv6_prot.sysctl_mem = init_net.ipv4.sysctl_tcp_mem;
 
 	/*
@@ -1242,10 +1237,6 @@ ipmr_fail:
 icmp_fail:
 	unregister_pernet_subsys(&inet6_net_ops);
 register_pernet_fail:
-#ifdef CONFIG_SYSCTL
-	ipv6_static_sysctl_unregister();
-static_sysctl_fail:
-#endif
 	sock_unregister(PF_INET6);
 	rtnl_unregister_all(PF_INET6);
 out_sock_register_fail:
@@ -1272,9 +1263,6 @@ static void __exit inet6_exit(void)
 	/* Disallow any further netlink messages */
 	rtnl_unregister_all(PF_INET6);
 
-#ifdef CONFIG_SYSCTL
-	ipv6_sysctl_unregister();
-#endif
 	udpv6_exit();
 	udplitev6_exit();
 	tcpv6_exit();
@@ -1302,9 +1290,6 @@ static void __exit inet6_exit(void)
 	rawv6_exit();
 
 	unregister_pernet_subsys(&inet6_net_ops);
-#ifdef CONFIG_SYSCTL
-	ipv6_static_sysctl_unregister();
-#endif
 	proto_unregister(&rawv6_prot);
 	proto_unregister(&udplitev6_prot);
 	proto_unregister(&udpv6_prot);
diff --git a/net/ipv6/sysctl_net_ipv6.c b/net/ipv6/sysctl_net_ipv6.c
index 99279c8..cf1e96a 100644
--- a/net/ipv6/sysctl_net_ipv6.c
+++ b/net/ipv6/sysctl_net_ipv6.c
@@ -16,18 +16,6 @@
 #include <net/addrconf.h>
 #include <net/inet_frag.h>
 
-static struct ctl_table empty[1];
-
-static ctl_table ipv6_static_skeleton[] = {
-	{
-		.procname	= "neigh",
-		.maxlen		= 0,
-		.mode		= 0555,
-		.child		= empty,
-	},
-	{ }
-};
-
 static ctl_table ipv6_table_template[] = {
 	{
 		.procname	= "route",
@@ -160,18 +148,3 @@ void ipv6_sysctl_unregister(void)
 	unregister_net_sysctl_table(ip6_header);
 	unregister_pernet_subsys(&ipv6_sysctl_net_ops);
 }
-
-static struct ctl_table_header *ip6_base;
-
-int ipv6_static_sysctl_register(void)
-{
-	ip6_base = register_net_sysctl_table(&init_net, net_ipv6_ctl_path, ipv6_static_skeleton);
-	if (ip6_base == NULL)
-		return -ENOMEM;
-	return 0;
-}
-
-void ipv6_static_sysctl_unregister(void)
-{
-	unregister_net_sysctl_table(ip6_base);
-}
-- 
1.7.2.5

  parent reply	other threads:[~2012-04-19 23:22 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-19 23:17 [PATCH net-next 00/19] net: Sysctl simplifications and enhancements Eric W. Biederman
2012-04-19 23:18 ` [PATCH net-next 01/19] net: Implement register_net_sysctl Eric W. Biederman
2012-04-20  5:27   ` Pavel Emelyanov
2012-04-20  8:11     ` Eric W. Biederman
2012-04-20  8:45       ` Pavel Emelyanov
2012-04-19 23:19 ` [PATCH net-next 02/19] net sysctl: Register an empty /proc/sys/net Eric W. Biederman
2012-04-19 23:20 ` [PATCH net-next 03/19] net sysctl: Initialize the network sysctls sooner to avoid problems Eric W. Biederman
2012-04-19 23:22 ` [PATCH net-next 04/19] net: Kill register_sysctl_rotable Eric W. Biederman
2012-04-20 13:53   ` Serge E. Hallyn
2012-04-20 14:42     ` Eric W. Biederman
2012-04-19 23:24 ` [PATCH net-next 05/19] net: Move all of the network sysctls without a namespace into init_net Eric W. Biederman
2012-04-23  0:38   ` Gao feng
2012-04-23  1:50     ` Eric W. Biederman
2012-04-23  2:29       ` Gao feng
2012-04-19 23:25 ` [PATCH net-next 06/19] net core: Remove unneded creation of an empty net/core sysctl directory Eric W. Biederman
2012-04-19 23:26 ` Eric W. Biederman [this message]
2012-04-19 23:32 ` [PATCH net-next 08/19] net ipv4: Remove the unneeded registration of an empty net/ipv4/neigh Eric W. Biederman
2012-04-19 23:34 ` [PATCH net-next 09/19] net ax25: Simplify and cleanup the ax25 sysctl handling Eric W. Biederman
2012-04-19 23:35 ` [PATCH net-next 10/19] net llc: Don't use sysctl tables with .child entries Eric W. Biederman
2012-04-19 23:37 ` [PATCH net-next 11/19] net ipv6: " Eric W. Biederman
2012-04-19 23:38 ` [PATCH net-next 12/19] net neighbour: Convert to use register_net_sysctl Eric W. Biederman
2012-04-20  5:21   ` Pavel Emelyanov
2012-04-20  7:25     ` Eric W. Biederman
2012-04-22  2:36       ` Ben Hutchings
2012-04-19 23:40 ` [PATCH net-next 13/19] net decnet: " Eric W. Biederman
2012-04-19 23:41 ` [PATCH net-next 14/19] net ipv6: Convert addrconf " Eric W. Biederman
2012-04-19 23:42 ` [PATCH net-next 15/19] net ipv4: Convert devinet " Eric W. Biederman
2012-04-19 23:43 ` [PATCH net-next 16/19] net: Convert nf_conntrack_proto " Eric W. Biederman
2012-04-19 23:44 ` [PATCH net-next 17/19] net: Convert all sysctl registrations to register_net_sysctl Eric W. Biederman
2012-04-19 23:45 ` [PATCH net-next 18/19] net: Delete all remaining instances of ctl_path Eric W. Biederman
2012-04-19 23:46 ` [PATCH net-next 19/19] net: Remove register_net_sysctl_table Eric W. Biederman
2012-04-20  8:45 ` [PATCH net-next 00/19] net: Sysctl simplifications and enhancements Pavel Emelyanov
2012-04-21  1:24   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m18vhrgv6s.fsf@fess.ebiederm.org \
    --to=ebiederm@xmission$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=gaofeng@cn$(echo .)fujitsu.com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=pablo@netfilter$(echo .)org \
    --cc=serge@hallyn$(echo .)com \
    --cc=shemminger@vyatta$(echo .)com \
    --cc=xemul@openvz$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox