diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2015-05-26 11:53:52 -0400 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2015-08-12 16:33:14 +0200 |
commit | 4204f4baa75900dc53fa1b6d5363036298cd2a83 (patch) | |
tree | 0c54fffe9191e385914399b78f72f27bab4e3398 /fs | |
parent | ef8500b18fc4bb03286a93b6032d56ec7bcbfd15 (diff) | |
download | lwn-4204f4baa75900dc53fa1b6d5363036298cd2a83.tar.gz lwn-4204f4baa75900dc53fa1b6d5363036298cd2a83.zip |
NFS: Fix size of NFSACL SETACL operations
commit d683cc49daf7c5afca8cd9654aaa1bf63cdf2ad9 upstream.
When encoding the NFSACL SETACL operation, reserve just the estimated
size of the ACL rather than a fixed maximum. This eliminates needless
zero padding on the wire that the server ignores.
Fixes: ee5dc7732bd5 ('NFS: Fix "kernel BUG at fs/nfs/nfs3xdr.c:1338!"')
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/nfs3xdr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/nfs3xdr.c b/fs/nfs/nfs3xdr.c index 183c6b123d0f..bee14a3f52f5 100644 --- a/fs/nfs/nfs3xdr.c +++ b/fs/nfs/nfs3xdr.c @@ -1333,7 +1333,7 @@ static void nfs3_xdr_enc_setacl3args(struct rpc_rqst *req, if (args->npages != 0) xdr_write_pages(xdr, args->pages, 0, args->len); else - xdr_reserve_space(xdr, NFS_ACL_INLINE_BUFSIZE); + xdr_reserve_space(xdr, args->len); error = nfsacl_encode(xdr->buf, base, args->inode, (args->mask & NFS_ACL) ? |