public inbox for linux-cifs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Aurélien Aptel" <aaptel@suse.com>
To: Steve French <smfrench@gmail.com>, CIFS <linux-cifs@vger.kernel.org>
Cc: linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	David Howells <dhowells@redhat.com>
Subject: Re: [PATCH] cifs: use discard iterator to discard unneeded network data more efficiently
Date: Thu, 04 Feb 2021 11:29:15 +0100	[thread overview]
Message-ID: <87eehwnn2c.fsf@suse.com> (raw)
In-Reply-To: <CAH2r5ms9dJ3RW=_+c0HApLyUC=LD5ACp_nhE2jJQuS-121kV=w@mail.gmail.com>

Steve French <smfrench@gmail.com> writes:
> +ssize_t
> +cifs_discard_from_socket(struct TCP_Server_Info *server, size_t to_read)
> +{
> +	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.

Cheers,
-- 
Aurélien Aptel / SUSE Labs Samba Team
GPG: 1839 CB5F 9F5B FB9B AA97  8C99 03C8 A49B 521B D5D3
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg, DE
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 247165 (AG München)


  reply	other threads:[~2021-02-04 10:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-04  6:25 [PATCH] cifs: use discard iterator to discard unneeded network data more efficiently Steve French
2021-02-04 10:29 ` Aurélien Aptel [this message]
2021-02-07  9:57   ` David Howells
2021-02-25 19:29   ` Steve French
2021-02-25 19:43     ` Steve French
2021-02-25 21:01       ` Steve French

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87eehwnn2c.fsf@suse.com \
    --to=aaptel@suse.com \
    --cc=dhowells@redhat.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=smfrench@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox