mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-11 00:42:56 -04:00
NFSD: Replace READ* macros in nfsd4_decode_readdir()
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
This commit is contained in:
@@ -1234,17 +1234,22 @@ nfsd4_decode_read(struct nfsd4_compoundargs *argp, struct nfsd4_read *read)
|
||||
static __be32
|
||||
nfsd4_decode_readdir(struct nfsd4_compoundargs *argp, struct nfsd4_readdir *readdir)
|
||||
{
|
||||
DECODE_HEAD;
|
||||
__be32 status;
|
||||
|
||||
READ_BUF(24);
|
||||
p = xdr_decode_hyper(p, &readdir->rd_cookie);
|
||||
COPYMEM(readdir->rd_verf.data, sizeof(readdir->rd_verf.data));
|
||||
readdir->rd_dircount = be32_to_cpup(p++);
|
||||
readdir->rd_maxcount = be32_to_cpup(p++);
|
||||
if ((status = nfsd4_decode_bitmap(argp, readdir->rd_bmval)))
|
||||
goto out;
|
||||
if (xdr_stream_decode_u64(argp->xdr, &readdir->rd_cookie) < 0)
|
||||
return nfserr_bad_xdr;
|
||||
status = nfsd4_decode_verifier4(argp, &readdir->rd_verf);
|
||||
if (status)
|
||||
return status;
|
||||
if (xdr_stream_decode_u32(argp->xdr, &readdir->rd_dircount) < 0)
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user