Skip to content

Commit

Permalink
NFS: Fix size of NFSACL SETACL operations
Browse files Browse the repository at this point in the history
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: ee5dc77 ('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>
  • Loading branch information
chucklever authored and trondmypd committed Jun 2, 2015
1 parent 7ef5ca4 commit d683cc4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/nfs/nfs3xdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) ?
Expand Down

0 comments on commit d683cc4

Please sign in to comment.