summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2020-11-16 17:56:17 -0500
committerChuck Lever <chuck.lever@oracle.com>2020-11-30 14:46:39 -0500
commitb07bebd9eb9842e2d0dea87efeb92884556e55b0 (patch)
tree81932e8ae5486903671c8fc68d9df04bd51a71b7
parent9aa62f5199749b274454b6d7d914c9b2a5e77031 (diff)
NFSD: Replace READ* macros in nfsd4_decode_share_deny()
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
-rw-r--r--fs/nfsd/nfs4xdr.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 6bfb549721b1..fe2c71ad595e 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -1063,16 +1063,13 @@ static __be32 nfsd4_decode_share_access(struct nfsd4_compoundargs *argp, u32 *sh
static __be32 nfsd4_decode_share_deny(struct nfsd4_compoundargs *argp, u32 *x)
{
- __be32 *p;
-
- READ_BUF(4);
- *x = be32_to_cpup(p++);
- /* Note: unlinke access bits, deny bits may be zero. */
+ if (xdr_stream_decode_u32(argp->xdr, x) < 0)
+ return nfserr_bad_xdr;
+ /* Note: unlike access bits, deny bits may be zero. */
if (*x & ~NFS4_SHARE_DENY_BOTH)
return nfserr_bad_xdr;
+
return nfs_ok;
-xdr_error:
- return nfserr_bad_xdr;
}
static __be32