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>
This commit is contained in:
parent
f99e8f715a
commit
ec8f23ce0f
36 changed files with 44 additions and 171 deletions
|
@ -815,8 +815,7 @@ static __net_init int ipv4_sysctl_init_net(struct net *net)
|
|||
|
||||
tcp_init_mem(net);
|
||||
|
||||
net->ipv4.ipv4_hdr = register_net_sysctl_table(net,
|
||||
net_ipv4_ctl_path, table);
|
||||
net->ipv4.ipv4_hdr = register_net_sysctl(net, "net/ipv4", table);
|
||||
if (net->ipv4.ipv4_hdr == NULL)
|
||||
goto err_reg;
|
||||
|
||||
|
@ -857,7 +856,7 @@ static __init int sysctl_ipv4_init(void)
|
|||
if (!i->procname)
|
||||
return -EINVAL;
|
||||
|
||||
hdr = register_net_sysctl_table(&init_net, net_ipv4_ctl_path, ipv4_table);
|
||||
hdr = register_net_sysctl(&init_net, "net/ipv4", ipv4_table);
|
||||
if (hdr == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue