From: Olaf Kirch <okir@suse.de>
To: nfs@lists.sourceforge.net
Subject: [PATCH 4/4] Make sunrpc and lockd use register_sysctl_table_path
Date: Thu, 3 Aug 2006 13:05:38 +0200 [thread overview]
Message-ID: <20060803110538.GA17178@suse.de> (raw)
From: Olaf Kirch <okir@suse.de>
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 <okir@suse.de>
fs/lockd/svc.c | 29 ++++++-----------------------
net/sunrpc/sysctl.c | 16 ++++------------
2 files changed, 10 insertions(+), 35 deletions(-)
Index: linux-2.6.18/net/sunrpc/sysctl.c
===================================================================
--- linux-2.6.18.orig/net/sunrpc/sysctl.c
+++ linux-2.6.18/net/sunrpc/sysctl.c
@@ -38,7 +38,9 @@ void
rpc_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_size
static 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
Index: linux-2.6.18/fs/lockd/svc.c
===================================================================
--- linux-2.6.18.orig/fs/lockd/svc.c
+++ linux-2.6.18/fs/lockd/svc.c
@@ -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_set
static 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 - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
reply other threads:[~2006-08-03 11:05 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20060803110538.GA17178@suse.de \
--to=okir@suse.de \
--cc=nfs@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.