Skip to content

Commit

Permalink
NFSD: Update the NFSv2 ACL ACCESS argument decoder to use struct xdr_…
Browse files Browse the repository at this point in the history
…stream

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
  • Loading branch information
Chuck Lever committed Jan 25, 2021
1 parent 571d31f commit 6406389
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions fs/nfsd/nfs2acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,14 +222,15 @@ static int nfsaclsvc_decode_setaclargs(struct svc_rqst *rqstp, __be32 *p)

static int nfsaclsvc_decode_accessargs(struct svc_rqst *rqstp, __be32 *p)
{
struct nfsd3_accessargs *argp = rqstp->rq_argp;
struct xdr_stream *xdr = &rqstp->rq_arg_stream;
struct nfsd3_accessargs *args = rqstp->rq_argp;

p = nfs2svc_decode_fh(p, &argp->fh);
if (!p)
if (!svcxdr_decode_fhandle(xdr, &args->fh))
return 0;
if (xdr_stream_decode_u32(xdr, &args->access) < 0)
return 0;
argp->access = ntohl(*p++);

return xdr_argsize_check(rqstp, p);
return 1;
}

/*
Expand Down

0 comments on commit 6406389

Please sign in to comment.