Commit ca9cf9fc authored by Chuck Lever's avatar Chuck Lever

NFSD: Replace READ* macros in nfsd4_decode_locku()

Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
parent 0a146f04
...@@ -909,21 +909,23 @@ nfsd4_decode_lockt(struct nfsd4_compoundargs *argp, struct nfsd4_lockt *lockt) ...@@ -909,21 +909,23 @@ nfsd4_decode_lockt(struct nfsd4_compoundargs *argp, struct nfsd4_lockt *lockt)
static __be32 static __be32
nfsd4_decode_locku(struct nfsd4_compoundargs *argp, struct nfsd4_locku *locku) nfsd4_decode_locku(struct nfsd4_compoundargs *argp, struct nfsd4_locku *locku)
{ {
DECODE_HEAD; __be32 status;
READ_BUF(8); if (xdr_stream_decode_u32(argp->xdr, &locku->lu_type) < 0)
locku->lu_type = be32_to_cpup(p++); return nfserr_bad_xdr;
if ((locku->lu_type < NFS4_READ_LT) || (locku->lu_type > NFS4_WRITEW_LT)) if ((locku->lu_type < NFS4_READ_LT) || (locku->lu_type > NFS4_WRITEW_LT))
goto xdr_error; return nfserr_bad_xdr;
locku->lu_seqid = be32_to_cpup(p++); if (xdr_stream_decode_u32(argp->xdr, &locku->lu_seqid) < 0)
status = nfsd4_decode_stateid(argp, &locku->lu_stateid); return nfserr_bad_xdr;
status = nfsd4_decode_stateid4(argp, &locku->lu_stateid);
if (status) if (status)
return status; return status;
READ_BUF(16); if (xdr_stream_decode_u64(argp->xdr, &locku->lu_offset) < 0)
p = xdr_decode_hyper(p, &locku->lu_offset); return nfserr_bad_xdr;
p = xdr_decode_hyper(p, &locku->lu_length); if (xdr_stream_decode_u64(argp->xdr, &locku->lu_length) < 0)
return nfserr_bad_xdr;
DECODE_TAIL; return nfs_ok;
} }
static __be32 static __be32
......
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