Signed-off-by: Chuck Lever <chuck.lever@xxxxxxxxxx> --- fs/nfsd/nfs3xdr.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/fs/nfsd/nfs3xdr.c b/fs/nfsd/nfs3xdr.c index 05fa16d91564..a74c309ad429 100644 --- a/fs/nfsd/nfs3xdr.c +++ b/fs/nfsd/nfs3xdr.c @@ -594,14 +594,18 @@ nfs3svc_decode_readdirplusargs(struct svc_rqst *rqstp, __be32 *p) int nfs3svc_decode_commitargs(struct svc_rqst *rqstp, __be32 *p) { + struct xdr_stream *xdr = &rqstp->rq_xdr_stream; struct nfsd3_commitargs *args = rqstp->rq_argp; - p = decode_fh(p, &args->fh); + + if (!svcxdr_decode_nfs_fh3(xdr, &args->fh)) + return XDR_DECODE_FAILED; + p = xdr_inline_decode(xdr, sizeof(__be32) * 3); if (!p) - return 0; + return XDR_DECODE_FAILED; p = xdr_decode_hyper(p, &args->offset); - args->count = ntohl(*p++); + args->count = be32_to_cpup(p); - return xdr_argsize_check(rqstp, p); + return XDR_DECODE_DONE; } /*