NFSD: Replace READ* macros in nfsd4_decode_sequence()
[ Upstream commit cf907b11326d9360877d6c6ea8f75e1b29f39f2f ] Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
ea65b904b6
commit
61b880dbaf
1 changed files with 20 additions and 16 deletions
|
@ -1738,22 +1738,6 @@ nfsd4_decode_free_stateid(struct nfsd4_compoundargs *argp,
|
||||||
return nfsd4_decode_stateid4(argp, &free_stateid->fr_stateid);
|
return nfsd4_decode_stateid4(argp, &free_stateid->fr_stateid);
|
||||||
}
|
}
|
||||||
|
|
||||||
static __be32
|
|
||||||
nfsd4_decode_sequence(struct nfsd4_compoundargs *argp,
|
|
||||||
struct nfsd4_sequence *seq)
|
|
||||||
{
|
|
||||||
DECODE_HEAD;
|
|
||||||
|
|
||||||
READ_BUF(NFS4_MAX_SESSIONID_LEN + 16);
|
|
||||||
COPYMEM(seq->sessionid.data, NFS4_MAX_SESSIONID_LEN);
|
|
||||||
seq->seqid = be32_to_cpup(p++);
|
|
||||||
seq->slotid = be32_to_cpup(p++);
|
|
||||||
seq->maxslots = be32_to_cpup(p++);
|
|
||||||
seq->cachethis = be32_to_cpup(p++);
|
|
||||||
|
|
||||||
DECODE_TAIL;
|
|
||||||
}
|
|
||||||
|
|
||||||
static __be32
|
static __be32
|
||||||
nfsd4_decode_test_stateid(struct nfsd4_compoundargs *argp, struct nfsd4_test_stateid *test_stateid)
|
nfsd4_decode_test_stateid(struct nfsd4_compoundargs *argp, struct nfsd4_test_stateid *test_stateid)
|
||||||
{
|
{
|
||||||
|
@ -1915,6 +1899,26 @@ static __be32 nfsd4_decode_secinfo_no_name(struct nfsd4_compoundargs *argp,
|
||||||
return nfs_ok;
|
return nfs_ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static __be32
|
||||||
|
nfsd4_decode_sequence(struct nfsd4_compoundargs *argp,
|
||||||
|
struct nfsd4_sequence *seq)
|
||||||
|
{
|
||||||
|
__be32 *p, status;
|
||||||
|
|
||||||
|
status = nfsd4_decode_sessionid4(argp, &seq->sessionid);
|
||||||
|
if (status)
|
||||||
|
return status;
|
||||||
|
p = xdr_inline_decode(argp->xdr, XDR_UNIT * 4);
|
||||||
|
if (!p)
|
||||||
|
return nfserr_bad_xdr;
|
||||||
|
seq->seqid = be32_to_cpup(p++);
|
||||||
|
seq->slotid = be32_to_cpup(p++);
|
||||||
|
seq->maxslots = be32_to_cpup(p++);
|
||||||
|
seq->cachethis = be32_to_cpup(p);
|
||||||
|
|
||||||
|
return nfs_ok;
|
||||||
|
}
|
||||||
|
|
||||||
static __be32
|
static __be32
|
||||||
nfsd4_decode_fallocate(struct nfsd4_compoundargs *argp,
|
nfsd4_decode_fallocate(struct nfsd4_compoundargs *argp,
|
||||||
struct nfsd4_fallocate *fallocate)
|
struct nfsd4_fallocate *fallocate)
|
||||||
|
|
Loading…
Add table
Reference in a new issue