diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2015-05-26 11:53:52 -0400 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2015-08-04 14:40:20 -0400 |
commit | c7f10946b88af6d5d82bc9f84d008f0d089972d9 (patch) | |
tree | 8a02b870cf40ae0fb58baf004fb13406121b34ed /fs | |
parent | 448d34256e77574e0d0b8ffdc35ec3239d9acfa0 (diff) | |
download | lwn-c7f10946b88af6d5d82bc9f84d008f0d089972d9.tar.gz lwn-c7f10946b88af6d5d82bc9f84d008f0d089972d9.zip |
NFS: Fix size of NFSACL SETACL operations
[ Upstream commit d683cc49daf7c5afca8cd9654aaa1bf63cdf2ad9 ]
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: Sasha Levin <sasha.levin@oracle.com>
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 8f4cbe7f4aa8..53853ca134e5 100644 --- a/fs/nfs/nfs3xdr.c +++ b/fs/nfs/nfs3xdr.c @@ -1342,7 +1342,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) ? |