Commit 07f5c296 authored by Chuck Lever's avatar Chuck Lever

NFSD: Update the NFSv2 ACL ACCESS result encoder to use struct xdr_stream

Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
parent 8d2009a1
......@@ -282,16 +282,21 @@ static int nfsaclsvc_encode_getaclres(struct svc_rqst *rqstp, __be32 *p)
/* ACCESS */
static int nfsaclsvc_encode_accessres(struct svc_rqst *rqstp, __be32 *p)
{
struct xdr_stream *xdr = &rqstp->rq_res_stream;
struct nfsd3_accessres *resp = rqstp->rq_resp;
*p++ = resp->status;
if (resp->status != nfs_ok)
goto out;
if (!svcxdr_encode_stat(xdr, resp->status))
return 0;
switch (resp->status) {
case nfs_ok:
if (!svcxdr_encode_fattr(rqstp, xdr, &resp->fh, &resp->stat))
return 0;
if (xdr_stream_encode_u32(xdr, resp->access) < 0)
return 0;
break;
}
p = nfs2svc_encode_fattr(rqstp, p, &resp->fh, &resp->stat);
*p++ = htonl(resp->access);
out:
return xdr_ressize_check(rqstp, p);
return 1;
}
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment