summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4xdr.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2020-11-04 16:44:05 +0100
committerChuck Lever <chuck.lever@oracle.com>2020-11-30 20:46:42 +0100
commit6aef27aaeae7611f98af08205acc79f5a8f3aa59 (patch)
treebda8a0405f2c9ebc8ce3cce47fed676daaf1600f /fs/nfsd/nfs4xdr.c
parentNFSD: Replace READ* macros in nfsd4_decode_reclaim_complete() (diff)
downloadlinux-6aef27aaeae7611f98af08205acc79f5a8f3aa59.tar.xz
linux-6aef27aaeae7611f98af08205acc79f5a8f3aa59.zip
NFSD: Replace READ* macros in nfsd4_decode_fallocate()
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to '')
-rw-r--r--fs/nfsd/nfs4xdr.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 59f89af5b924..b9f448dc8247 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -1906,17 +1906,17 @@ static __be32
nfsd4_decode_fallocate(struct nfsd4_compoundargs *argp,
struct nfsd4_fallocate *fallocate)
{
- DECODE_HEAD;
+ __be32 status;
- status = nfsd4_decode_stateid(argp, &fallocate->falloc_stateid);
+ status = nfsd4_decode_stateid4(argp, &fallocate->falloc_stateid);
if (status)
return status;
+ if (xdr_stream_decode_u64(argp->xdr, &fallocate->falloc_offset) < 0)
+ return nfserr_bad_xdr;
+ if (xdr_stream_decode_u64(argp->xdr, &fallocate->falloc_length) < 0)
+ return nfserr_bad_xdr;
- READ_BUF(16);
- p = xdr_decode_hyper(p, &fallocate->falloc_offset);
- xdr_decode_hyper(p, &fallocate->falloc_length);
-
- DECODE_TAIL;
+ return nfs_ok;
}
static __be32