summaryrefslogtreecommitdiff
path: root/fs/cifs/connect.c
diff options
context:
space:
mode:
authorLong Li <longli@microsoft.com>2018-05-30 22:47:55 +0300
committerSteve French <smfrench@gmail.com>2018-06-03 02:36:26 +0300
commit1dbe3466b4d26078d907c64e2b68faed5dc58854 (patch)
tree71e7b518df1a3b243e4130aa66ccb53f22590466 /fs/cifs/connect.c
parentf9f5aca115fd4a4b49cdc483084a0dc4ca316b25 (diff)
downloadlinux-1dbe3466b4d26078d907c64e2b68faed5dc58854.tar.xz
CIFS: Use offset when reading pages
With offset defined in rdata, transport functions need to look at this offset when reading data into the correct places in pages. Signed-off-by: Long Li <longli@microsoft.com> Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r--fs/cifs/connect.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index adc97d0be7c0..e5a2fe7f0dd4 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -599,10 +599,11 @@ cifs_read_from_socket(struct TCP_Server_Info *server, char *buf,
int
cifs_read_page_from_socket(struct TCP_Server_Info *server, struct page *page,
- unsigned int to_read)
+ unsigned int page_offset, unsigned int to_read)
{
struct msghdr smb_msg;
- struct bio_vec bv = {.bv_page = page, .bv_len = to_read};
+ struct bio_vec bv = {
+ .bv_page = page, .bv_len = to_read, .bv_offset = page_offset};
iov_iter_bvec(&smb_msg.msg_iter, READ | ITER_BVEC, &bv, 1, to_read);
return cifs_readv_from_socket(server, &smb_msg);
}