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

Steve Dickson
2005-07-08T18:42:47Z

[-- Attachment #1: Type: text/plain, Size: 136 bytes --]

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.

[-- Attachment #2: linux-2.6.12.2-lockd-sysctl.patch --]
[-- Type: text/x-patch, Size: 984 bytes --]

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

Signed-off-by: Steve Dickson <steved@redhat.com>

--- linux-2.6.12.2/fs/lockd/svc.c.orig 2005-06-29 19:00:53.000000000 -0400
+++ linux-2.6.12.2/fs/lockd/svc.c 2005-07-08 14:26:41.671010000 -0400
@@ -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,