aboutsummaryrefslogtreecommitdiffstats
path: root/fs/lockd/svc.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-04-24 14:46:16 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-24 14:46:16 -0400
commit563307b2fa15d687abc54bd980b9847ebf0e3231 (patch)
tree7f16be30217a2e66360ede97aa27d07a4ebd7e55 /fs/lockd/svc.c
parent10c993a6b5418cb1026775765ba4c70ffb70853d (diff)
parent233607dbbc823caf685e778cabc49fb7f679900b (diff)
Merge git://git.linux-nfs.org/projects/trondmy/nfs-2.6
* git://git.linux-nfs.org/projects/trondmy/nfs-2.6: (80 commits) SUNRPC: Invalidate the RPCSEC_GSS session if the server dropped the request make nfs_automount_list static NFS: remove duplicate flags assignment from nfs_validate_mount_data NFS - fix potential NULL pointer dereference v2 SUNRPC: Don't change the RPCSEC_GSS context on a credential that is in use SUNRPC: Fix a race in gss_refresh_upcall() SUNRPC: Don't disconnect more than once if retransmitting NFSv4 requests SUNRPC: Remove the unused export of xprt_force_disconnect SUNRPC: remove XS_SENDMSG_RETRY SUNRPC: Protect creds against early garbage collection NFSv4: Attempt to use machine credentials in SETCLIENTID calls NFSv4: Reintroduce machine creds NFSv4: Don't use cred->cr_ops->cr_name in nfs4_proc_setclientid() nfs: fix printout of multiword bitfields nfs: return negative error value from nfs{,4}_stat_to_errno NLM/lockd: Ensure client locking calls use correct credentials NFS: Remove the buggy lock-if-signalled case from do_setlk() NLM/lockd: Fix a race when cancelling a blocking lock NLM/lockd: Ensure that nlmclnt_cancel() returns results of the CANCEL call NLM: Remove the signal masking in nlmclnt_proc/nlmclnt_cancel ...
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);