aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/route.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2012-04-19 09:44:49 -0400
committerDavid S. Miller <davem@davemloft.net>2012-04-20 21:22:30 -0400
commitec8f23ce0f4005b74013d4d122e0d540397a93c9 (patch)
treec2f22aa08ad4c0197d3cb41b91cf8d436794fde1 /net/ipv4/route.c
parentf99e8f715a5c7ebad5410b1e9b4d744ddb284f54 (diff)
net: Convert all sysctl registrations to register_net_sysctl
This results in code with less boiler plate that is a bit easier to read. Additionally stops us from using compatibility code in the sysctl core, hastening the day when the compatibility code can be removed. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Acked-by: Pavel Emelyanov <xemul@parallels.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r--net/ipv4/route.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index adf2105a6e85..5773f5d9e213 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -3354,13 +3354,6 @@ static struct ctl_table ipv4_route_flush_table[] = {
3354 { }, 3354 { },
3355}; 3355};
3356 3356
3357static __net_initdata struct ctl_path ipv4_route_path[] = {
3358 { .procname = "net", },
3359 { .procname = "ipv4", },
3360 { .procname = "route", },
3361 { },
3362};
3363
3364static __net_init int sysctl_route_net_init(struct net *net) 3357static __net_init int sysctl_route_net_init(struct net *net)
3365{ 3358{
3366 struct ctl_table *tbl; 3359 struct ctl_table *tbl;
@@ -3373,8 +3366,7 @@ static __net_init int sysctl_route_net_init(struct net *net)
3373 } 3366 }
3374 tbl[0].extra1 = net; 3367 tbl[0].extra1 = net;
3375 3368
3376 net->ipv4.route_hdr = 3369 net->ipv4.route_hdr = register_net_sysctl(net, "net/ipv4/route", tbl);
3377 register_net_sysctl_table(net, ipv4_route_path, tbl);
3378 if (net->ipv4.route_hdr == NULL) 3370 if (net->ipv4.route_hdr == NULL)
3379 goto err_reg; 3371 goto err_reg;
3380 return 0; 3372 return 0;