Make sunrpc and lockd use register_sysctl_table_path
Subsystems (3)
PATCH 4/4 Make sunrpc and lockd use register_sysctl_table_path
From: Olaf Kirch <[email protected]>
Subject: Make sunrpc and lockd use register_sysctl_table_path
This changes lockd and sunrpc to use the new register_sysctl_table_path call.
Signed-off-by Olaf Kirch <[email protected]>
fs/lockd/svc.c | 29 ++++++----------------------- net/sunrpc/sysctl.c | 16 ++++------------ 2 files changed, 10 insertions(+), 35 deletions(-)
net/sunrpc/sysctl.c +4 -12
@@ -38,7 +38,9 @@ voidrpc_register_sysctl (void) {if (!sunrpc_table_header) { - sunrpc_table_header =register_sysctl_table (sunrpc_table,1 ); +struct ctl_path ctl_path[] = { {CTL_SUNRPC ,"sunrpc" ,0555 }, {0 } }; + + sunrpc_table_header =register_sysctl_table_path (sunrpc_table, ctl_path);#ifdef CONFIG_PROC_FS if (sunrpc_table[0 ].de) sunrpc_table[0 ].de->owner =THIS_MODULE ;
@@ -125,7 +127,7 @@ static unsigned int max_slot_table_sizestatic unsigned int xprt_min_resvport_limit =RPC_MIN_RESVPORT ;static unsigned int xprt_max_resvport_limit =RPC_MAX_RESVPORT ; -static ctl_table debug_table[] = { +static ctl_table sunrpc_table[] = { { .ctl_name =CTL_RPCDEBUG , .procname ="rpc_debug" ,
@@ -205,14 +207,4 @@ static ctl_table debug_table[] = { { .ctl_name = 0 } }; -static ctl_table sunrpc_table[] = { - { - .ctl_name =CTL_SUNRPC , - .procname ="sunrpc" , - .mode =0555 , - .child = debug_table - }, - { .ctl_name =0 } -}; -#endif
fs/lockd/svc.c +6 -23
@@ -371,26 +371,6 @@ static ctl_table nlm_sysctls[] = { { .ctl_name = 0 } }; -static ctl_table nlm_sysctl_dir[] = { - { - .ctl_name =CTL_UNNUMBERED , - .procname ="nfs" , - .mode =0555 , - .child = nlm_sysctls, - }, - { .ctl_name =0 } -}; - -static ctl_table nlm_sysctl_root[] = { - { - .ctl_name =CTL_FS , - .procname ="fs" , - .mode =0555 , - .child = nlm_sysctl_dir, - }, - { .ctl_name =0 } -}; -/* * Module (and driverfs) parameters. */
@@ -463,15 +443,18 @@ module_param_call(nlm_tcpport, param_setstatic int __init init_nlm (void ) { - nlm_sysctl_table =register_sysctl_table (nlm_sysctl_root,0 ); -return nlm_sysctl_table ?0 : -ENOMEM ; +struct ctl_path ctl_path[] = { {CTL_FS ,"fs" ,0555 }, {-2 ,"nfs" ,0555 }, {0 } }; + + nlm_sysctl_table =register_sysctl_table_path (nlm_sysctls, ctl_path); +return 0 ; } static void __exit exit_nlm(void) {/* FIXME: delete all NLM clients */ nlm_shutdown_hosts (); -unregister_sysctl_table (nlm_sysctl_table); +if (nlm_sysctl_table) +unregister_sysctl_table (nlm_sysctl_table); }module_init (init_nlm);
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs