aboutsummaryrefslogtreecommitdiffstats
path: root/fs/lockd/svc.c
diff options
context:
space:
mode:
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 cf977bbcf303..2169af4d5455 100644
--- a/fs/lockd/svc.c
+++ b/fs/lockd/svc.c
@@ -72,7 +72,9 @@ static const unsigned long nlm_timeout_min = 3;
72static const unsigned long nlm_timeout_max = 20; 72static const unsigned long nlm_timeout_max = 20;
73static const int nlm_port_min = 0, nlm_port_max = 65535; 73static const int nlm_port_min = 0, nlm_port_max = 65535;
74 74
75#ifdef CONFIG_SYSCTL
75static struct ctl_table_header * nlm_sysctl_table; 76static struct ctl_table_header * nlm_sysctl_table;
77#endif
76 78
77static unsigned long get_lockd_grace_period(void) 79static unsigned long get_lockd_grace_period(void)
78{ 80{
@@ -349,6 +351,8 @@ out:
349} 351}
350EXPORT_SYMBOL(lockd_down); 352EXPORT_SYMBOL(lockd_down);
351 353
354#ifdef CONFIG_SYSCTL
355
352/* 356/*
353 * Sysctl parameters (same as module parameters, different interface). 357 * Sysctl parameters (same as module parameters, different interface).
354 */ 358 */
@@ -433,6 +437,8 @@ static ctl_table nlm_sysctl_root[] = {
433 { .ctl_name = 0 } 437 { .ctl_name = 0 }
434}; 438};
435 439
440#endif /* CONFIG_SYSCTL */
441
436/* 442/*
437 * Module (and sysfs) parameters. 443 * Module (and sysfs) parameters.
438 */ 444 */
@@ -506,15 +512,21 @@ module_param(nsm_use_hostnames, bool, 0644);
506 512
507static int __init init_nlm(void) 513static int __init init_nlm(void)
508{ 514{
515#ifdef CONFIG_SYSCTL
509 nlm_sysctl_table = register_sysctl_table(nlm_sysctl_root); 516 nlm_sysctl_table = register_sysctl_table(nlm_sysctl_root);
510 return nlm_sysctl_table ? 0 : -ENOMEM; 517 return nlm_sysctl_table ? 0 : -ENOMEM;
518#else
519 return 0;
520#endif
511} 521}
512 522
513static void __exit exit_nlm(void) 523static void __exit exit_nlm(void)
514{ 524{
515 /* FIXME: delete all NLM clients */ 525 /* FIXME: delete all NLM clients */
516 nlm_shutdown_hosts(); 526 nlm_shutdown_hosts();
527#ifdef CONFIG_SYSCTL
517 unregister_sysctl_table(nlm_sysctl_table); 528 unregister_sysctl_table(nlm_sysctl_table);
529#endif
518} 530}
519 531
520module_init(init_nlm); 532module_init(init_nlm);