aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4xdr.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfsd/nfs4xdr.c')
-rw-r--r--fs/nfsd/nfs4xdr.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 9f30c53ac0ed..df341956254e 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -926,26 +926,26 @@ nfsd4_decode_write(struct nfsd4_compoundargs *argp, struct nfsd4_write *write)
926 printk(KERN_NOTICE "xdr error! (%s:%d)\n", __FILE__, __LINE__); 926 printk(KERN_NOTICE "xdr error! (%s:%d)\n", __FILE__, __LINE__);
927 goto xdr_error; 927 goto xdr_error;
928 } 928 }
929 write->wr_vec[0].iov_base = p; 929 argp->rqstp->rq_vec[0].iov_base = p;
930 write->wr_vec[0].iov_len = avail; 930 argp->rqstp->rq_vec[0].iov_len = avail;
931 v = 0; 931 v = 0;
932 len = write->wr_buflen; 932 len = write->wr_buflen;
933 while (len > write->wr_vec[v].iov_len) { 933 while (len > argp->rqstp->rq_vec[v].iov_len) {
934 len -= write->wr_vec[v].iov_len; 934 len -= argp->rqstp->rq_vec[v].iov_len;
935 v++; 935 v++;
936 write->wr_vec[v].iov_base = page_address(argp->pagelist[0]); 936 argp->rqstp->rq_vec[v].iov_base = page_address(argp->pagelist[0]);
937 argp->pagelist++; 937 argp->pagelist++;
938 if (argp->pagelen >= PAGE_SIZE) { 938 if (argp->pagelen >= PAGE_SIZE) {
939 write->wr_vec[v].iov_len = PAGE_SIZE; 939 argp->rqstp->rq_vec[v].iov_len = PAGE_SIZE;
940 argp->pagelen -= PAGE_SIZE; 940 argp->pagelen -= PAGE_SIZE;
941 } else { 941 } else {
942 write->wr_vec[v].iov_len = argp->pagelen; 942 argp->rqstp->rq_vec[v].iov_len = argp->pagelen;
943 argp->pagelen -= len; 943 argp->pagelen -= len;
944 } 944 }
945 } 945 }
946 argp->end = (u32*) (write->wr_vec[v].iov_base + write->wr_vec[v].iov_len); 946 argp->end = (u32*) (argp->rqstp->rq_vec[v].iov_base + argp->rqstp->rq_vec[v].iov_len);
947 argp->p = (u32*) (write->wr_vec[v].iov_base + (XDR_QUADLEN(len) << 2)); 947 argp->p = (u32*) (argp->rqstp->rq_vec[v].iov_base + (XDR_QUADLEN(len) << 2));
948 write->wr_vec[v].iov_len = len; 948 argp->rqstp->rq_vec[v].iov_len = len;
949 write->wr_vlen = v+1; 949 write->wr_vlen = v+1;
950 950
951 DECODE_TAIL; 951 DECODE_TAIL;
@@ -2063,9 +2063,9 @@ nfsd4_encode_read(struct nfsd4_compoundres *resp, int nfserr,
2063 v = 0; 2063 v = 0;
2064 while (len > 0) { 2064 while (len > 0) {
2065 pn = resp->rqstp->rq_resused++; 2065 pn = resp->rqstp->rq_resused++;
2066 read->rd_iov[v].iov_base = 2066 resp->rqstp->rq_vec[v].iov_base =
2067 page_address(resp->rqstp->rq_respages[pn]); 2067 page_address(resp->rqstp->rq_respages[pn]);
2068 read->rd_iov[v].iov_len = 2068 resp->rqstp->rq_vec[v].iov_len =
2069 len < PAGE_SIZE ? len : PAGE_SIZE; 2069 len < PAGE_SIZE ? len : PAGE_SIZE;
2070 v++; 2070 v++;
2071 len -= PAGE_SIZE; 2071 len -= PAGE_SIZE;
@@ -2073,7 +2073,7 @@ nfsd4_encode_read(struct nfsd4_compoundres *resp, int nfserr,
2073 read->rd_vlen = v; 2073 read->rd_vlen = v;
2074 2074
2075 nfserr = nfsd_read(read->rd_rqstp, read->rd_fhp, read->rd_filp, 2075 nfserr = nfsd_read(read->rd_rqstp, read->rd_fhp, read->rd_filp,
2076 read->rd_offset, read->rd_iov, read->rd_vlen, 2076 read->rd_offset, resp->rqstp->rq_vec, read->rd_vlen,
2077 &maxcount); 2077 &maxcount);
2078 2078
2079 if (nfserr == nfserr_symlink) 2079 if (nfserr == nfserr_symlink)