Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1374674

[PATCH 5/6] cifs_readv_receive: use cifs_read_from_socket()

From Al Viro <viro@ZenIV.linux.org.uk>
Newsgroups linux.kernel
Subject [PATCH 5/6] cifs_readv_receive: use cifs_read_from_socket()
Date 2016-04-09 23:00 +0200
Message-ID <rm894-2mv-13@gated-at.bofh.it> (permalink)
References <rm7Zo-2jd-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
 fs/cifs/cifssmb.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 76fcb50..3da077a 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)
 	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;
-- 
2.8.0.rc3

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC][PATCHSET] reduce messing with iovecs in cifs Al Viro <viro@ZenIV.linux.org.uk> - 2016-04-09 22:50 +0200
  [PATCH 3/6] cifs: quit playing games with draining iovecs Al Viro <viro@ZenIV.linux.org.uk> - 2016-04-09 23:00 +0200
  [PATCH 1/6] [net] drop 'size' argument of sock_recvmsg() Al Viro <viro@ZenIV.linux.org.uk> - 2016-04-09 23:00 +0200
  [PATCH 6/6] cifs: don't bother with kmap on read_pages side Al Viro <viro@ZenIV.linux.org.uk> - 2016-04-09 23:00 +0200
  [PATCH 2/6] cifs: merge the hash calculation helpers Al Viro <viro@ZenIV.linux.org.uk> - 2016-04-09 23:00 +0200
    Re: [PATCH 2/6] cifs: merge the hash calculation helpers Shirish Pargaonkar <shirishpargaonkar@gmail.com> - 2016-04-13 07:10 +0200
  [PATCH 4/6] cifs: no need to wank with copying and advancing iovec  on recvmsg side either Al Viro <viro@ZenIV.linux.org.uk> - 2016-04-09 23:00 +0200
  [PATCH 5/6] cifs_readv_receive: use cifs_read_from_socket() Al Viro <viro@ZenIV.linux.org.uk> - 2016-04-09 23:00 +0200
  Re: [RFC][PATCHSET] reduce messing with iovecs in cifs Shirish Pargaonkar <shirishpargaonkar@gmail.com> - 2016-04-11 04:50 +0200

csiph-web