cifs_readv_receive: use cifs_read_from_socket()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
09aab880f7
commit
a6137305a8
|
@ -1447,10 +1447,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) -
|
len = min_t(unsigned int, buflen, server->vals->read_rsp_size) -
|
||||||
HEADER_SIZE(server) + 1;
|
HEADER_SIZE(server) + 1;
|
||||||
|
|
||||||
rdata->iov.iov_base = buf + HEADER_SIZE(server) - 1;
|
length = cifs_read_from_socket(server,
|
||||||
rdata->iov.iov_len = len;
|
buf + HEADER_SIZE(server) - 1, len);
|
||||||
|
|
||||||
length = cifs_readv_from_socket(server, &rdata->iov, 1, len);
|
|
||||||
if (length < 0)
|
if (length < 0)
|
||||||
return length;
|
return length;
|
||||||
server->total_read += length;
|
server->total_read += length;
|
||||||
|
@ -1502,9 +1500,8 @@ cifs_readv_receive(struct TCP_Server_Info *server, struct mid_q_entry *mid)
|
||||||
len = data_offset - server->total_read;
|
len = data_offset - server->total_read;
|
||||||
if (len > 0) {
|
if (len > 0) {
|
||||||
/* read any junk before data into the rest of smallbuf */
|
/* read any junk before data into the rest of smallbuf */
|
||||||
rdata->iov.iov_base = buf + server->total_read;
|
length = cifs_read_from_socket(server,
|
||||||
rdata->iov.iov_len = len;
|
buf + server->total_read, len);
|
||||||
length = cifs_readv_from_socket(server, &rdata->iov, 1, len);
|
|
||||||
if (length < 0)
|
if (length < 0)
|
||||||
return length;
|
return length;
|
||||||
server->total_read += length;
|
server->total_read += length;
|
||||||
|
|
Loading…
Reference in New Issue