diff options
author | Jeff Layton <jlayton@redhat.com> | 2012-09-19 06:22:32 -0700 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2012-09-24 21:46:32 -0500 |
commit | 8321fec436050b586cee448f2da0a6999e5172dd (patch) | |
tree | ee361f0ea1ca398158f7ccc71e2dc4ae4b9b89b0 /fs/cifs/smb2pdu.c | |
parent | c5fab6f4f081afcfcd7c1d444d9b900d6ef3e50b (diff) |
cifs: convert async read code to use pages array without kmapping
Replace the "marshal_iov" function with a "read_into_pages" function.
That function will copy the read data off the socket and into the
pages array, kmapping and reading pages one at a time.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Diffstat (limited to 'fs/cifs/smb2pdu.c')
-rw-r--r-- | fs/cifs/smb2pdu.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index 68023d23702..e3efa47cd6e 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c @@ -1300,7 +1300,11 @@ smb2_readv_callback(struct mid_q_entry *mid) struct smb2_hdr *buf = (struct smb2_hdr *)rdata->iov[0].iov_base; unsigned int credits_received = 1; struct smb_rqst rqst = { .rq_iov = rdata->iov, - .rq_nvec = rdata->nr_iov }; + .rq_nvec = 1, + .rq_pages = rdata->pages, + .rq_npages = rdata->nr_pages, + .rq_pagesz = rdata->pagesz, + .rq_tailsz = rdata->tailsz }; cFYI(1, "%s: mid=%llu state=%d result=%d bytes=%u", __func__, mid->mid, mid->mid_state, rdata->result, rdata->bytes); |