Commit 9aa62f51 authored by Chuck Lever's avatar Chuck Lever

NFSD: Replace READ* macros in nfsd4_decode_share_access()

Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
parent e6ec04b2
...@@ -1012,11 +1012,10 @@ nfsd4_decode_openflag4(struct nfsd4_compoundargs *argp, struct nfsd4_open *open) ...@@ -1012,11 +1012,10 @@ nfsd4_decode_openflag4(struct nfsd4_compoundargs *argp, struct nfsd4_open *open)
static __be32 nfsd4_decode_share_access(struct nfsd4_compoundargs *argp, u32 *share_access, u32 *deleg_want, u32 *deleg_when) static __be32 nfsd4_decode_share_access(struct nfsd4_compoundargs *argp, u32 *share_access, u32 *deleg_want, u32 *deleg_when)
{ {
__be32 *p;
u32 w; u32 w;
READ_BUF(4); if (xdr_stream_decode_u32(argp->xdr, &w) < 0)
w = be32_to_cpup(p++); return nfserr_bad_xdr;
*share_access = w & NFS4_SHARE_ACCESS_MASK; *share_access = w & NFS4_SHARE_ACCESS_MASK;
*deleg_want = w & NFS4_SHARE_WANT_MASK; *deleg_want = w & NFS4_SHARE_WANT_MASK;
if (deleg_when) if (deleg_when)
...@@ -1059,7 +1058,6 @@ static __be32 nfsd4_decode_share_access(struct nfsd4_compoundargs *argp, u32 *sh ...@@ -1059,7 +1058,6 @@ static __be32 nfsd4_decode_share_access(struct nfsd4_compoundargs *argp, u32 *sh
NFS4_SHARE_PUSH_DELEG_WHEN_UNCONTENDED): NFS4_SHARE_PUSH_DELEG_WHEN_UNCONTENDED):
return nfs_ok; return nfs_ok;
} }
xdr_error:
return nfserr_bad_xdr; return nfserr_bad_xdr;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment