aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2016-01-09 19:37:16 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2016-03-28 14:05:43 -0400
commita6137305a8c47fa92ab1a8efcfe76f0e9fa96ab7 (patch)
treec56b702f0903af8713bb76017fdfc33f1bc2e2d0
parent09aab880f7c5ac31e9db18a63353b980bcb52261 (diff)
cifs_readv_receive: use cifs_read_from_socket()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--fs/cifs/cifssmb.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 76fcb50295a3..3da077afad1f 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -1447,10 +1447,8 @@ cifs_readv_receive(struct TCP_Server_Info *server, struct mid_q_entry *mid)
1447 len = min_t(unsigned int, buflen, server->vals->read_rsp_size) - 1447 len = min_t(unsigned int, buflen, server->vals->read_rsp_size) -
1448 HEADER_SIZE(server) + 1; 1448 HEADER_SIZE(server) + 1;
1449 1449
1450 rdata->iov.iov_base = buf + HEADER_SIZE(server) - 1; 1450 length = cifs_read_from_socket(server,
1451 rdata->iov.iov_len = len; 1451 buf + HEADER_SIZE(server) - 1, len);
1452
1453 length = cifs_readv_from_socket(server, &rdata->iov, 1, len);
1454 if (length < 0) 1452 if (length < 0)
1455 return length; 1453 return length;
1456 server->total_read += length; 1454 server->total_read += length;
@@ -1502,9 +1500,8 @@ cifs_readv_receive(struct TCP_Server_Info *server, struct mid_q_entry *mid)
1502 len = data_offset - server->total_read; 1500 len = data_offset - server->total_read;
1503 if (len > 0) { 1501 if (len > 0) {
1504 /* read any junk before data into the rest of smallbuf */ 1502 /* read any junk before data into the rest of smallbuf */
1505 rdata->iov.iov_base = buf + server->total_read; 1503 length = cifs_read_from_socket(server,
1506 rdata->iov.iov_len = len; 1504 buf + server->total_read, len);
1507 length = cifs_readv_from_socket(server, &rdata->iov, 1, len);
1508 if (length < 0) 1505 if (length < 0)
1509 return length; 1506 return length;
1510 server->total_read += length; 1507 server->total_read += length;