mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
NFS: Fix the XDR iovec calculation in nfs3_xdr_setaclargs
Commit ae46141ff0
(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 <leonardo.lists@gmail.com>
Tested-by: Suresh Jayaraman <sjayaraman@suse.de>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
608faf1ff2
commit
8340437210
1 changed files with 2 additions and 1 deletions
|
@ -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) ?
|
||||
|
|
Loading…
Reference in a new issue