summaryrefslogtreecommitdiff
path: root/fs/nfsd/xdr3.h
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2014-01-10 01:24:35 +0400
committerJ. Bruce Fields <bfields@redhat.com>2014-01-23 22:50:27 +0400
commit068c34c0ce8add2e5f01ee6c85710e6fefb832ad (patch)
treeafdc7ef6f2a5d385fa7393b1d25a6d4aa1855b81 /fs/nfsd/xdr3.h
parent3554116d3aae25353713f3d0131d86ae6c1e5674 (diff)
downloadlinux-068c34c0ce8add2e5f01ee6c85710e6fefb832ad.tar.xz
nfsd: fix encode_entryplus_baggage stack usage
We stick an extra svc_fh in nfsd3_readdirres to save the need to kmalloc, though maybe it would be fine to kmalloc instead. Acked-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/xdr3.h')
-rw-r--r--fs/nfsd/xdr3.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfsd/xdr3.h b/fs/nfsd/xdr3.h
index b6d5542a4ac8..335e04aaf7db 100644
--- a/fs/nfsd/xdr3.h
+++ b/fs/nfsd/xdr3.h
@@ -174,6 +174,9 @@ struct nfsd3_linkres {
struct nfsd3_readdirres {
__be32 status;
struct svc_fh fh;
+ /* Just to save kmalloc on every readdirplus entry (svc_fh is a
+ * little large for the stack): */
+ struct svc_fh scratch;
int count;
__be32 verf[2];