Commit c51e92c7 authored by Al Viro's avatar Al Viro Committed by Thadeu Lima de Souza Cascardo

cifs_readv_receive: use cifs_read_from_socket()

BugLink: http://bugs.launchpad.net/bugs/1670508Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
(cherry picked from commit a6137305)
Signed-off-by: default avatarJoseph Salisbury <joseph.salisbury@canonical.com>
parent 8f28daef
......@@ -1450,10 +1450,8 @@ cifs_readv_receive(struct TCP_Server_Info *server, struct mid_q_entry *mid)
len = min_t(unsigned int, buflen, server->vals->read_rsp_size) -
HEADER_SIZE(server) + 1;
rdata->iov.iov_base = buf + HEADER_SIZE(server) - 1;
rdata->iov.iov_len = len;
length = cifs_readv_from_socket(server, &rdata->iov, 1, len);
length = cifs_read_from_socket(server,
buf + HEADER_SIZE(server) - 1, len);
if (length < 0)
return length;
server->total_read += length;
......@@ -1505,9 +1503,8 @@ cifs_readv_receive(struct TCP_Server_Info *server, struct mid_q_entry *mid)
len = data_offset - server->total_read;
if (len > 0) {
/* read any junk before data into the rest of smallbuf */
rdata->iov.iov_base = buf + server->total_read;
rdata->iov.iov_len = len;
length = cifs_readv_from_socket(server, &rdata->iov, 1, len);
length = cifs_read_from_socket(server,
buf + server->total_read, len);
if (length < 0)
return length;
server->total_read += length;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment