aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/lockd/lockd.h
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2007-03-29 16:47:47 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2007-05-01 01:17:09 -0400
commit511d2e8855a065c8251d0c140ebc353854f1929e (patch)
treed01c1327f1558ce46ee49dd1ba16da79e7720147 /include/linux/lockd/lockd.h
parentca52fec152282ef73e5e882b847b36b1febbb1c6 (diff)
NLM: Shrink the maximum request size of NLM4 requests
NLM version 4 requests estimate the call and reply header sizes rather conservatively, using the very maximum size allowed in the protocol even though Linux always uses only a small fraction of the allowable space. Reduce the size of caller and lock arguments to conserve RPC buffer space while XDR encoding NLM4 arguments. Add compile-time checks to ensure the hostname string won't overflow NLM protocol maximums. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include/linux/lockd/lockd.h')
-rw-r--r--include/linux/lockd/lockd.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h
index ac25b5649c59..f6a81e0b1b93 100644
--- a/include/linux/lockd/lockd.h
+++ b/include/linux/lockd/lockd.h
@@ -88,7 +88,7 @@ struct nlm_wait;
88/* 88/*
89 * Memory chunk for NLM client RPC request. 89 * Memory chunk for NLM client RPC request.
90 */ 90 */
91#define NLMCLNT_OHSIZE (sizeof(utsname()->nodename)+10) 91#define NLMCLNT_OHSIZE ((__NEW_UTS_LEN) + 10u)
92struct nlm_rqst { 92struct nlm_rqst {
93 unsigned int a_flags; /* initial RPC task flags */ 93 unsigned int a_flags; /* initial RPC task flags */
94 struct nlm_host * a_host; /* host handle */ 94 struct nlm_host * a_host; /* host handle */