diff options
Diffstat (limited to 'fs/nfsd/nfs3proc.c')
-rw-r--r-- | fs/nfsd/nfs3proc.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/fs/nfsd/nfs3proc.c b/fs/nfsd/nfs3proc.c index f61142afea44..a5ebc7dbb384 100644 --- a/fs/nfsd/nfs3proc.c +++ b/fs/nfsd/nfs3proc.c | |||
@@ -160,6 +160,7 @@ nfsd3_proc_read(struct svc_rqst *rqstp, struct nfsd3_readargs *argp, | |||
160 | struct nfsd3_readres *resp) | 160 | struct nfsd3_readres *resp) |
161 | { | 161 | { |
162 | int nfserr; | 162 | int nfserr; |
163 | u32 max_blocksize = svc_max_payload(rqstp); | ||
163 | 164 | ||
164 | dprintk("nfsd: READ(3) %s %lu bytes at %lu\n", | 165 | dprintk("nfsd: READ(3) %s %lu bytes at %lu\n", |
165 | SVCFH_fmt(&argp->fh), | 166 | SVCFH_fmt(&argp->fh), |
@@ -172,15 +173,15 @@ nfsd3_proc_read(struct svc_rqst *rqstp, struct nfsd3_readargs *argp, | |||
172 | */ | 173 | */ |
173 | 174 | ||
174 | resp->count = argp->count; | 175 | resp->count = argp->count; |
175 | if (NFSSVC_MAXBLKSIZE < resp->count) | 176 | if (max_blocksize < resp->count) |
176 | resp->count = NFSSVC_MAXBLKSIZE; | 177 | resp->count = max_blocksize; |
177 | 178 | ||
178 | svc_reserve(rqstp, ((1 + NFS3_POST_OP_ATTR_WORDS + 3)<<2) + resp->count +4); | 179 | svc_reserve(rqstp, ((1 + NFS3_POST_OP_ATTR_WORDS + 3)<<2) + resp->count +4); |
179 | 180 | ||
180 | fh_copy(&resp->fh, &argp->fh); | 181 | fh_copy(&resp->fh, &argp->fh); |
181 | nfserr = nfsd_read(rqstp, &resp->fh, NULL, | 182 | nfserr = nfsd_read(rqstp, &resp->fh, NULL, |
182 | argp->offset, | 183 | argp->offset, |
183 | argp->vec, argp->vlen, | 184 | rqstp->rq_vec, argp->vlen, |
184 | &resp->count); | 185 | &resp->count); |
185 | if (nfserr == 0) { | 186 | if (nfserr == 0) { |
186 | struct inode *inode = resp->fh.fh_dentry->d_inode; | 187 | struct inode *inode = resp->fh.fh_dentry->d_inode; |
@@ -210,7 +211,7 @@ nfsd3_proc_write(struct svc_rqst *rqstp, struct nfsd3_writeargs *argp, | |||
210 | resp->committed = argp->stable; | 211 | resp->committed = argp->stable; |
211 | nfserr = nfsd_write(rqstp, &resp->fh, NULL, | 212 | nfserr = nfsd_write(rqstp, &resp->fh, NULL, |
212 | argp->offset, | 213 | argp->offset, |
213 | argp->vec, argp->vlen, | 214 | rqstp->rq_vec, argp->vlen, |
214 | argp->len, | 215 | argp->len, |
215 | &resp->committed); | 216 | &resp->committed); |
216 | resp->count = argp->count; | 217 | resp->count = argp->count; |
@@ -538,15 +539,16 @@ nfsd3_proc_fsinfo(struct svc_rqst * rqstp, struct nfsd_fhandle *argp, | |||
538 | struct nfsd3_fsinfores *resp) | 539 | struct nfsd3_fsinfores *resp) |
539 | { | 540 | { |
540 | int nfserr; | 541 | int nfserr; |
542 | u32 max_blocksize = svc_max_payload(rqstp); | ||
541 | 543 | ||
542 | dprintk("nfsd: FSINFO(3) %s\n", | 544 | dprintk("nfsd: FSINFO(3) %s\n", |
543 | SVCFH_fmt(&argp->fh)); | 545 | SVCFH_fmt(&argp->fh)); |
544 | 546 | ||
545 | resp->f_rtmax = NFSSVC_MAXBLKSIZE; | 547 | resp->f_rtmax = max_blocksize; |
546 | resp->f_rtpref = NFSSVC_MAXBLKSIZE; | 548 | resp->f_rtpref = max_blocksize; |
547 | resp->f_rtmult = PAGE_SIZE; | 549 | resp->f_rtmult = PAGE_SIZE; |
548 | resp->f_wtmax = NFSSVC_MAXBLKSIZE; | 550 | resp->f_wtmax = max_blocksize; |
549 | resp->f_wtpref = NFSSVC_MAXBLKSIZE; | 551 | resp->f_wtpref = max_blocksize; |
550 | resp->f_wtmult = PAGE_SIZE; | 552 | resp->f_wtmult = PAGE_SIZE; |
551 | resp->f_dtpref = PAGE_SIZE; | 553 | resp->f_dtpref = PAGE_SIZE; |
552 | resp->f_maxfilesize = ~(u32) 0; | 554 | resp->f_maxfilesize = ~(u32) 0; |