Skip to content

Commit d683cc4

Browse files
chucklevertrondmypd
authored andcommitted
NFS: Fix size of NFSACL SETACL operations
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 <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
1 parent 7ef5ca4 commit d683cc4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/nfs/nfs3xdr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1342,7 +1342,7 @@ static void nfs3_xdr_enc_setacl3args(struct rpc_rqst *req,
13421342
if (args->npages != 0)
13431343
xdr_write_pages(xdr, args->pages, 0, args->len);
13441344
else
1345-
xdr_reserve_space(xdr, NFS_ACL_INLINE_BUFSIZE);
1345+
xdr_reserve_space(xdr, args->len);
13461346

13471347
error = nfsacl_encode(xdr->buf, base, args->inode,
13481348
(args->mask & NFS_ACL) ?

0 commit comments

Comments
 (0)