Re: [PATCH] cifs: use discard iterator to discard unneeded network data more efficiently

David Howells
2021-02-07T09:59:30Z

Aurélien Aptel <aaptel@suse.com> wrote:

> > +{
> > + struct msghdr smb_msg;
> > +
> > + iov_iter_discard(&smb_msg.msg_iter, READ, to_read);
> > +
> > + return cifs_readv_from_socket(server, &smb_msg);
> > +}
> > +
>
> Shouldn't smb_msg be initialized to zeroes? Looking around this needs to
> be done for cifs_read_from_socket() and cifs_read_page_from_socket() too.

Yeah - I think you're right. I didn't manage to finish making the changes,
so what I gave to Steve wasn't tested.

David