]> git.karo-electronics.de Git - linux-beck.git/commitdiff
cifs_readv_receive: use cifs_read_from_socket()
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 10 Jan 2016 00:37:16 +0000 (19:37 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 28 Mar 2016 18:05:43 +0000 (14:05 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/cifs/cifssmb.c

index 76fcb50295a38b63a58a0d3f656d023e02b988a8..3da077afad1fe01b4da22a1010e49572b64317c3 100644 (file)
@@ -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) -
                                                        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;
@@ -1502,9 +1500,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;