net ax25: Simplify and cleanup the ax25 sysctl handling.
Don't register/unregister every ax25 table in a batch. Instead register and unregister per device ax25 sysctls as ax25 devices come and go. This moves ax25 to be a completely modern sysctl user. Registering the sysctls in just the initial network namespace, removing the use of .child entries that are no longer natively supported by the sysctl core and taking advantage of the fact that there are no longer any ordering constraints between registering and unregistering different sysctl tables. 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:

committed by
David S. Miller

parent
4e5ca78541
commit
0ca7a4c87d
@@ -1990,7 +1990,6 @@ static int __init ax25_init(void)
|
||||
sock_register(&ax25_family_ops);
|
||||
dev_add_pack(&ax25_packet_type);
|
||||
register_netdevice_notifier(&ax25_dev_notifier);
|
||||
ax25_register_sysctl();
|
||||
|
||||
proc_net_fops_create(&init_net, "ax25_route", S_IRUGO, &ax25_route_fops);
|
||||
proc_net_fops_create(&init_net, "ax25", S_IRUGO, &ax25_info_fops);
|
||||
@@ -2015,7 +2014,6 @@ static void __exit ax25_exit(void)
|
||||
ax25_uid_free();
|
||||
ax25_dev_free();
|
||||
|
||||
ax25_unregister_sysctl();
|
||||
unregister_netdevice_notifier(&ax25_dev_notifier);
|
||||
|
||||
dev_remove_pack(&ax25_packet_type);
|
||||
|
Reference in New Issue
Block a user