NFSD: Replace READ* macros in nfsd4_decode_listxattrs()
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
This commit is contained in:
parent
403366a7e8
commit
2212036cad
@ -2223,11 +2223,10 @@ static __be32
|
|||||||
nfsd4_decode_listxattrs(struct nfsd4_compoundargs *argp,
|
nfsd4_decode_listxattrs(struct nfsd4_compoundargs *argp,
|
||||||
struct nfsd4_listxattrs *listxattrs)
|
struct nfsd4_listxattrs *listxattrs)
|
||||||
{
|
{
|
||||||
DECODE_HEAD;
|
|
||||||
u32 maxcount;
|
u32 maxcount;
|
||||||
|
|
||||||
READ_BUF(12);
|
if (xdr_stream_decode_u64(argp->xdr, &listxattrs->lsxa_cookie) < 0)
|
||||||
p = xdr_decode_hyper(p, &listxattrs->lsxa_cookie);
|
return nfserr_bad_xdr;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If the cookie is too large to have even one user.x attribute
|
* If the cookie is too large to have even one user.x attribute
|
||||||
@ -2237,7 +2236,8 @@ nfsd4_decode_listxattrs(struct nfsd4_compoundargs *argp,
|
|||||||
(XATTR_LIST_MAX / (XATTR_USER_PREFIX_LEN + 2)))
|
(XATTR_LIST_MAX / (XATTR_USER_PREFIX_LEN + 2)))
|
||||||
return nfserr_badcookie;
|
return nfserr_badcookie;
|
||||||
|
|
||||||
maxcount = be32_to_cpup(p++);
|
if (xdr_stream_decode_u32(argp->xdr, &maxcount) < 0)
|
||||||
|
return nfserr_bad_xdr;
|
||||||
if (maxcount < 8)
|
if (maxcount < 8)
|
||||||
/* Always need at least 2 words (length and one character) */
|
/* Always need at least 2 words (length and one character) */
|
||||||
return nfserr_inval;
|
return nfserr_inval;
|
||||||
@ -2245,7 +2245,7 @@ nfsd4_decode_listxattrs(struct nfsd4_compoundargs *argp,
|
|||||||
maxcount = min(maxcount, svc_max_payload(argp->rqstp));
|
maxcount = min(maxcount, svc_max_payload(argp->rqstp));
|
||||||
listxattrs->lsxa_maxcount = maxcount;
|
listxattrs->lsxa_maxcount = maxcount;
|
||||||
|
|
||||||
DECODE_TAIL;
|
return nfs_ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
static __be32
|
static __be32
|
||||||
|
Loading…
Reference in New Issue
Block a user