aboutsummaryrefslogtreecommitdiff
path: root/fs/lockd/svc.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2008-04-24 14:01:02 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2008-04-24 14:01:02 -0400
commit233607dbbc823caf685e778cabc49fb7f679900b (patch)
tree13840137ee10788061cbec60fcfe8ea4c274558e /fs/lockd/svc.c
parent3dc5063786b273f1aee545844f6bd4e9651ebffe (diff)
parentb48633bd086d21f4a2a5bea96c7e6c7ba58eb60c (diff)
Merge branch 'devel'
Diffstat (limited to 'fs/lockd/svc.c')
-rw-r--r--fs/lockd/svc.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
index 1ed8bd4de94..38c2f0b1dd7 100644
--- a/fs/lockd/svc.c
+++ b/fs/lockd/svc.c
@@ -74,7 +74,9 @@ static const unsigned long nlm_timeout_min = 3;
static const unsigned long nlm_timeout_max = 20;
static const int nlm_port_min = 0, nlm_port_max = 65535;
+#ifdef CONFIG_SYSCTL
static struct ctl_table_header * nlm_sysctl_table;
+#endif
static unsigned long get_lockd_grace_period(void)
{
@@ -359,6 +361,8 @@ out:
}
EXPORT_SYMBOL(lockd_down);
+#ifdef CONFIG_SYSCTL
+
/*
* Sysctl parameters (same as module parameters, different interface).
*/
@@ -443,6 +447,8 @@ static ctl_table nlm_sysctl_root[] = {
{ .ctl_name = 0 }
};
+#endif /* CONFIG_SYSCTL */
+
/*
* Module (and sysfs) parameters.
*/
@@ -516,15 +522,21 @@ module_param(nsm_use_hostnames, bool, 0644);
static int __init init_nlm(void)
{
+#ifdef CONFIG_SYSCTL
nlm_sysctl_table = register_sysctl_table(nlm_sysctl_root);
return nlm_sysctl_table ? 0 : -ENOMEM;
+#else
+ return 0;
+#endif
}
static void __exit exit_nlm(void)
{
/* FIXME: delete all NLM clients */
nlm_shutdown_hosts();
+#ifdef CONFIG_SYSCTL
unregister_sysctl_table(nlm_sysctl_table);
+#endif
}
module_init(init_nlm);