NFSD: Replace READ* macros in nfsd4_decode_readdir()
[ Upstream commit 0dfaf2a371436860ace6af889e6cd8410ee63164 ] Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
d0a0219a35
commit
c24e2a4943
@@ -1234,17 +1234,22 @@ nfsd4_decode_read(struct nfsd4_compoundargs *argp, struct nfsd4_read *read)
|
|||||||
static __be32
|
static __be32
|
||||||
nfsd4_decode_readdir(struct nfsd4_compoundargs *argp, struct nfsd4_readdir *readdir)
|
nfsd4_decode_readdir(struct nfsd4_compoundargs *argp, struct nfsd4_readdir *readdir)
|
||||||
{
|
{
|
||||||
DECODE_HEAD;
|
__be32 status;
|
||||||
|
|
||||||
READ_BUF(24);
|
if (xdr_stream_decode_u64(argp->xdr, &readdir->rd_cookie) < 0)
|
||||||
p = xdr_decode_hyper(p, &readdir->rd_cookie);
|
return nfserr_bad_xdr;
|
||||||
COPYMEM(readdir->rd_verf.data, sizeof(readdir->rd_verf.data));
|
status = nfsd4_decode_verifier4(argp, &readdir->rd_verf);
|
||||||
readdir->rd_dircount = be32_to_cpup(p++);
|
if (status)
|
||||||
readdir->rd_maxcount = be32_to_cpup(p++);
|
return status;
|
||||||
if ((status = nfsd4_decode_bitmap(argp, readdir->rd_bmval)))
|
if (xdr_stream_decode_u32(argp->xdr, &readdir->rd_dircount) < 0)
|
||||||
goto out;
|
return nfserr_bad_xdr;
|
||||||
|
if (xdr_stream_decode_u32(argp->xdr, &readdir->rd_maxcount) < 0)
|
||||||
|
return nfserr_bad_xdr;
|
||||||
|
if (xdr_stream_decode_uint32_array(argp->xdr, readdir->rd_bmval,
|
||||||
|
ARRAY_SIZE(readdir->rd_bmval)) < 0)
|
||||||
|
return nfserr_bad_xdr;
|
||||||
|
|
||||||
DECODE_TAIL;
|
return nfs_ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
static __be32
|
static __be32
|
||||||
|
Reference in New Issue
Block a user