diff options
author | Kinglong Mee <kinglongmee@gmail.com> | 2014-06-10 14:08:19 +0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2014-06-23 19:31:36 +0400 |
commit | 3c7aa15d2073d81e56e8ba8771a4ab6f23be7ae2 (patch) | |
tree | f76a11c503dd24636dbd36dfb9a58aa3d76ad54e /fs/nfsd/nfs3proc.c | |
parent | a497c3ba1d97fc69c1e78e7b96435ba8c2cb42ee (diff) | |
download | linux-3c7aa15d2073d81e56e8ba8771a4ab6f23be7ae2.tar.xz |
NFSD: Using min/max/min_t/max_t for calculate
Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs3proc.c')
-rw-r--r-- | fs/nfsd/nfs3proc.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/nfsd/nfs3proc.c b/fs/nfsd/nfs3proc.c index 401289913130..61ef42c7b0a6 100644 --- a/fs/nfsd/nfs3proc.c +++ b/fs/nfsd/nfs3proc.c @@ -157,11 +157,7 @@ nfsd3_proc_read(struct svc_rqst *rqstp, struct nfsd3_readargs *argp, * 1 (status) + 22 (post_op_attr) + 1 (count) + 1 (eof) * + 1 (xdr opaque byte count) = 26 */ - - resp->count = argp->count; - if (max_blocksize < resp->count) - resp->count = max_blocksize; - + resp->count = min(argp->count, max_blocksize); svc_reserve_auth(rqstp, ((1 + NFS3_POST_OP_ATTR_WORDS + 3)<<2) + resp->count +4); fh_copy(&resp->fh, &argp->fh); |