summaryrefslogtreecommitdiff
path: root/fs/nfsd
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2020-11-03 22:33:12 +0300
committerChuck Lever <chuck.lever@oracle.com>2020-11-30 22:46:42 +0300
commit53d70873e37c09a582167ed73d1858e3a2af0157 (patch)
tree3b3b28f89e3127c1195eb0fc502a61ea9ebf03b7 /fs/nfsd
parent645fcad371420913c30e9aca80fc0a38f3acf432 (diff)
downloadlinux-53d70873e37c09a582167ed73d1858e3a2af0157.tar.xz
NFSD: Replace READ* macros in nfsd4_decode_secinfo_no_name()
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfs4xdr.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 4a4cf3ea16f9..2a738af6106a 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -1357,17 +1357,6 @@ nfsd4_decode_secinfo(struct nfsd4_compoundargs *argp,
}
static __be32
-nfsd4_decode_secinfo_no_name(struct nfsd4_compoundargs *argp,
- struct nfsd4_secinfo_no_name *sin)
-{
- DECODE_HEAD;
-
- READ_BUF(4);
- sin->sin_style = be32_to_cpup(p++);
- DECODE_TAIL;
-}
-
-static __be32
nfsd4_decode_setattr(struct nfsd4_compoundargs *argp, struct nfsd4_setattr *setattr)
{
__be32 status;
@@ -1918,6 +1907,14 @@ nfsd4_decode_layoutreturn(struct nfsd4_compoundargs *argp,
}
#endif /* CONFIG_NFSD_PNFS */
+static __be32 nfsd4_decode_secinfo_no_name(struct nfsd4_compoundargs *argp,
+ struct nfsd4_secinfo_no_name *sin)
+{
+ if (xdr_stream_decode_u32(argp->xdr, &sin->sin_style) < 0)
+ return nfserr_bad_xdr;
+ return nfs_ok;
+}
+
static __be32
nfsd4_decode_fallocate(struct nfsd4_compoundargs *argp,
struct nfsd4_fallocate *fallocate)