NFSD: Replace READ* macros in nfsd4_decode_layoutget()
[ Upstream commit c8e88e3aa73889421461f878cd569ef84f231ceb ] Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
b4ae5eebd4
commit
9aae15ca48
1 changed files with 17 additions and 14 deletions
|
@ -1844,24 +1844,27 @@ static __be32
|
||||||
nfsd4_decode_layoutget(struct nfsd4_compoundargs *argp,
|
nfsd4_decode_layoutget(struct nfsd4_compoundargs *argp,
|
||||||
struct nfsd4_layoutget *lgp)
|
struct nfsd4_layoutget *lgp)
|
||||||
{
|
{
|
||||||
DECODE_HEAD;
|
__be32 status;
|
||||||
|
|
||||||
READ_BUF(36);
|
if (xdr_stream_decode_u32(argp->xdr, &lgp->lg_signal) < 0)
|
||||||
lgp->lg_signal = be32_to_cpup(p++);
|
return nfserr_bad_xdr;
|
||||||
lgp->lg_layout_type = be32_to_cpup(p++);
|
if (xdr_stream_decode_u32(argp->xdr, &lgp->lg_layout_type) < 0)
|
||||||
lgp->lg_seg.iomode = be32_to_cpup(p++);
|
return nfserr_bad_xdr;
|
||||||
p = xdr_decode_hyper(p, &lgp->lg_seg.offset);
|
if (xdr_stream_decode_u32(argp->xdr, &lgp->lg_seg.iomode) < 0)
|
||||||
p = xdr_decode_hyper(p, &lgp->lg_seg.length);
|
return nfserr_bad_xdr;
|
||||||
p = xdr_decode_hyper(p, &lgp->lg_minlength);
|
if (xdr_stream_decode_u64(argp->xdr, &lgp->lg_seg.offset) < 0)
|
||||||
|
return nfserr_bad_xdr;
|
||||||
status = nfsd4_decode_stateid(argp, &lgp->lg_sid);
|
if (xdr_stream_decode_u64(argp->xdr, &lgp->lg_seg.length) < 0)
|
||||||
|
return nfserr_bad_xdr;
|
||||||
|
if (xdr_stream_decode_u64(argp->xdr, &lgp->lg_minlength) < 0)
|
||||||
|
return nfserr_bad_xdr;
|
||||||
|
status = nfsd4_decode_stateid4(argp, &lgp->lg_sid);
|
||||||
if (status)
|
if (status)
|
||||||
return status;
|
return status;
|
||||||
|
if (xdr_stream_decode_u32(argp->xdr, &lgp->lg_maxcount) < 0)
|
||||||
|
return nfserr_bad_xdr;
|
||||||
|
|
||||||
READ_BUF(4);
|
return nfs_ok;
|
||||||
lgp->lg_maxcount = be32_to_cpup(p++);
|
|
||||||
|
|
||||||
DECODE_TAIL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static __be32
|
static __be32
|
||||||
|
|
Loading…
Add table
Reference in a new issue