Skip to content

Commit

Permalink
NFS: Fix the XDR iovec calculation in nfs3_xdr_setaclargs
Browse files Browse the repository at this point in the history
Commit ae46141 (NFSv3: Fix posix ACL code)
introduces a bug in the calculation of the XDR header iovec. In the case
where we are inlining the acls, we need to adjust the length of the iovec
req->rq_svec, in addition to adjusting the total buffer length.

Tested-by: Leonardo Chiquitto <[email protected]>
Tested-by: Suresh Jayaraman <[email protected]>
Signed-off-by: Trond Myklebust <[email protected]>
Cc: [email protected]
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Trond Myklebust authored and torvalds committed Apr 21, 2009
1 parent 608faf1 commit 8340437
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/nfs/nfs3xdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,8 @@ nfs3_xdr_setaclargs(struct rpc_rqst *req, __be32 *p,
if (args->npages != 0)
xdr_encode_pages(buf, args->pages, 0, args->len);
else
req->rq_slen += args->len;
req->rq_slen = xdr_adjust_iovec(req->rq_svec,
p + XDR_QUADLEN(args->len));

err = nfsacl_encode(buf, base, args->inode,
(args->mask & NFS_ACL) ?
Expand Down

0 comments on commit 8340437

Please sign in to comment.