[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yy5wa7MAmb7AkoPa@ZenIV>
Date: Sat, 24 Sep 2022 03:50:19 +0100
From: Al Viro <viro@...iv.linux.org.uk>
To: David Howells <dhowells@...hat.com>
Cc: Steve French <smfrench@...il.com>,
Steve French <sfrench@...ba.org>,
Shyam Prasad N <nspmangalore@...il.com>,
Rohith Surabattula <rohiths.msft@...il.com>,
linux-cifs@...r.kernel.org, Jeff Layton <jlayton@...nel.org>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/7] cifs: Add a function to read into an iter from a
socket
On Tue, Aug 23, 2022 at 03:12:34PM +0100, David Howells wrote:
> +int
> +cifs_read_iter_from_socket(struct TCP_Server_Info *server, struct iov_iter *iter,
> + unsigned int to_read)
> +{
> + struct msghdr smb_msg;
> + int ret;
> +
> + smb_msg.msg_iter = *iter;
> + if (smb_msg.msg_iter.count > to_read)
> + smb_msg.msg_iter.count = to_read;
ITYM
iov_iter_truncate(&smb_msg.msg_iter, to_read);
> + ret = cifs_readv_from_socket(server, &smb_msg);
> + if (ret > 0)
> + iov_iter_advance(iter, ret);
> + return ret;
> +}
> +
> static bool
> is_smb_response(struct TCP_Server_Info *server, unsigned char type)
> {
>
>
Powered by blists - more mailing lists