Skip to contentSkip to conversation

NFS: procfs/sysctl interfaces for lockd do not work on x86_64

PATCH New Steve Dickson 1 participant 1 message Jul 8, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 NFS: procfs/sysctl interfaces for lockd do not work on x86_64

Here is an problem that was brought to my attention and I noticed it was not fixed in any of the upstream kernels I looked at.

steved.

A trivial patch that allows the setting of NLM timeouts and grace periods through the proc and sysclt interfaces on x86_64 architectures

fs/lockd/svc.c renamed from fs/lockd/svc.c.orig +2 -2
@@ -329,7 +329,7 @@ static ctl_table nlm_sysctls[] = {
 		.ctl_name	= CTL_UNNUMBERED,
 		.procname	= "nlm_grace_period",
 		.data		= &nlm_grace_period,
-		.maxlen		= sizeof(int),
+		.maxlen		= sizeof(unsigned long),
 		.mode		= 0644,
 		.proc_handler	= &proc_doulongvec_minmax,
 		.extra1		= (unsigned long *) &nlm_grace_period_min,
@@ -339,7 +339,7 @@ static ctl_table nlm_sysctls[] = {
 		.ctl_name	= CTL_UNNUMBERED,
 		.procname	= "nlm_timeout",
 		.data		= &nlm_timeout,
-		.maxlen		= sizeof(int),
+		.maxlen		= sizeof(unsigned long),
 		.mode		= 0644,
 		.proc_handler	= &proc_doulongvec_minmax,
 		.extra1		= (unsigned long *) &nlm_timeout_min,