summaryrefslogtreecommitdiff
path: root/include/linux/sunrpc
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2006-10-04 13:15:47 +0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-04 18:55:15 +0400
commit3cc03b164cf01c6f36e64720b58610d292fb26f7 (patch)
treeb558e11a087945ad5b9a1a25483aa2acc8d93fbb /include/linux/sunrpc
parent4452435948424e5322c2a2fefbdc2cf3732cc45d (diff)
downloadlinux-3cc03b164cf01c6f36e64720b58610d292fb26f7.tar.xz
[PATCH] knfsd: Avoid excess stack usage in svc_tcp_recvfrom
.. by allocating the array of 'kvec' in 'struct svc_rqst'. As we plan to increase RPCSVC_MAXPAGES from 8 upto 256, we can no longer allocate an array of this size on the stack. So we allocate it in 'struct svc_rqst'. However svc_rqst contains (indirectly) an array of the same type and size (actually several, but they are in a union). So rather than waste space, we move those arrays out of the separately allocated union and into svc_rqst to share with the kvec moved out of svc_tcp_recvfrom (various arrays are used at different times, so there is no conflict). Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/sunrpc')
-rw-r--r--include/linux/sunrpc/svc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
index 3669e91c43b8..cb0ed9beb227 100644
--- a/include/linux/sunrpc/svc.h
+++ b/include/linux/sunrpc/svc.h
@@ -192,6 +192,8 @@ struct svc_rqst {
struct page * *rq_respages; /* points into rq_pages */
int rq_resused; /* number of pages used for result */
+ struct kvec rq_vec[RPCSVC_MAXPAGES]; /* generally useful.. */
+
__be32 rq_xid; /* transmission id */
u32 rq_prog; /* program number */
u32 rq_vers; /* program version */