summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfsxdr.c
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2017-06-28 13:34:15 -0400
committerJ. Bruce Fields <bfields@redhat.com>2017-06-28 13:34:15 -0400
commit9a1d168e1bc2893120bb7c0d9932dd22f97d0b55 (patch)
treef7d419f1601419aa0aebda102a6b14bdf7653443 /fs/nfsd/nfsxdr.c
parentbb2a8b0cd116219777b99cb71fe9e24b31d3f521 (diff)
parent32c1431eea4881a6b17bd7c639315010aeefa452 (diff)
downloadlinux-9a1d168e1bc2893120bb7c0d9932dd22f97d0b55.tar.bz2
Merge tag 'v4.12-rc5' into nfsd tree
Update to get f0c3192ceee3 "virtio_net: lower limit on buffer size". That bug was interfering with my nfsd testing.
Diffstat (limited to 'fs/nfsd/nfsxdr.c')
-rw-r--r--fs/nfsd/nfsxdr.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/fs/nfsd/nfsxdr.c b/fs/nfsd/nfsxdr.c
index bb1998c5ae61..e4da2717982d 100644
--- a/fs/nfsd/nfsxdr.c
+++ b/fs/nfsd/nfsxdr.c
@@ -261,9 +261,6 @@ nfssvc_decode_readargs(struct svc_rqst *rqstp, __be32 *p)
len = args->count = ntohl(*p++);
p++; /* totalcount - unused */
- if (!xdr_argsize_check(rqstp, p))
- return 0;
-
len = min_t(unsigned int, len, NFSSVC_MAXBLKSIZE_V2);
/* set up somewhere to store response.
@@ -279,7 +276,7 @@ nfssvc_decode_readargs(struct svc_rqst *rqstp, __be32 *p)
v++;
}
args->vlen = v;
- return 1;
+ return xdr_argsize_check(rqstp, p);
}
int
@@ -373,11 +370,9 @@ nfssvc_decode_readlinkargs(struct svc_rqst *rqstp, __be32 *p)
p = decode_fh(p, &args->fh);
if (!p)
return 0;
- if (!xdr_argsize_check(rqstp, p))
- return 0;
args->buffer = page_address(*(rqstp->rq_next_page++));
- return 1;
+ return xdr_argsize_check(rqstp, p);
}
int
@@ -418,11 +413,9 @@ nfssvc_decode_readdirargs(struct svc_rqst *rqstp, __be32 *p)
args->cookie = ntohl(*p++);
args->count = ntohl(*p++);
args->count = min_t(u32, args->count, PAGE_SIZE);
- if (!xdr_argsize_check(rqstp, p))
- return 0;
args->buffer = page_address(*(rqstp->rq_next_page++));
- return 1;
+ return xdr_argsize_check(rqstp, p);
}
/*