aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-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 1ed8bd4de941..38c2f0b1dd7d 100644
--- a/fs/lockd/svc.c
+++ b/fs/lockd/svc.c
@@ -74,7 +74,9 @@ static const unsigned long nlm_timeout_min = 3;
74static const unsigned long nlm_timeout_max = 20; 74static const unsigned long nlm_timeout_max = 20;
75static const int nlm_port_min = 0, nlm_port_max = 65535; 75static const int nlm_port_min = 0, nlm_port_max = 65535;
76 76
77#ifdef CONFIG_SYSCTL
77static struct ctl_table_header * nlm_sysctl_table; 78static struct ctl_table_header * nlm_sysctl_table;
79#endif
78 80
79static unsigned long get_lockd_grace_period(void) 81static unsigned long get_lockd_grace_period(void)
80{ 82{
@@ -359,6 +361,8 @@ out:
359} 361}
360EXPORT_SYMBOL(lockd_down); 362EXPORT_SYMBOL(lockd_down);
361 363
364#ifdef CONFIG_SYSCTL
365
362/* 366/*
363 * Sysctl parameters (same as module parameters, different interface). 367 * Sysctl parameters (same as module parameters, different interface).
364 */ 368 */
@@ -443,6 +447,8 @@ static ctl_table nlm_sysctl_root[] = {
443 { .ctl_name = 0 } 447 { .ctl_name = 0 }
444}; 448};
445 449
450#endif /* CONFIG_SYSCTL */
451
446/* 452/*
447 * Module (and sysfs) parameters. 453 * Module (and sysfs) parameters.
448 */ 454 */
@@ -516,15 +522,21 @@ module_param(nsm_use_hostnames, bool, 0644);
516 522
517static int __init init_nlm(void) 523static int __init init_nlm(void)
518{ 524{
525#ifdef CONFIG_SYSCTL
519 nlm_sysctl_table = register_sysctl_table(nlm_sysctl_root); 526 nlm_sysctl_table = register_sysctl_table(nlm_sysctl_root);
520 return nlm_sysctl_table ? 0 : -ENOMEM; 527 return nlm_sysctl_table ? 0 : -ENOMEM;
528#else
529 return 0;
530#endif
521} 531}
522 532
523static void __exit exit_nlm(void) 533static void __exit exit_nlm(void)
524{ 534{
525 /* FIXME: delete all NLM clients */ 535 /* FIXME: delete all NLM clients */
526 nlm_shutdown_hosts(); 536 nlm_shutdown_hosts();
537#ifdef CONFIG_SYSCTL
527 unregister_sysctl_table(nlm_sysctl_table); 538 unregister_sysctl_table(nlm_sysctl_table);
539#endif
528} 540}
529 541
530module_init(init_nlm); 542module_init(init_nlm);