]> git.itanic.dy.fi Git - linux-stable/commit
cifs: use discard iterator to discard unneeded network data more efficiently
authorDavid Howells <dhowells@redhat.com>
Thu, 4 Feb 2021 06:15:21 +0000 (00:15 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Sep 2022 09:10:38 +0000 (11:10 +0200)
commit877231b0e67845c351b3ef4b5b5943c1e77b8ee9
tree475b0f62cb27774f7884bab59119c7c83e6e899d
parent09867977fcc258caab84031445345bdf3c2e0531
cifs: use discard iterator to discard unneeded network data more efficiently

[ Upstream commit cf0604a686b11175d8beae60281c4ccc95aaa5c2 ]

The iterator, ITER_DISCARD, that can only be used in READ mode and
just discards any data copied to it, was added to allow a network
filesystem to discard any unwanted data sent by a server.
Convert cifs_discard_from_socket() to use this.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Stable-dep-of: bedc8f76b353 ("cifs: always initialize struct msghdr smb_msg completely")
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/cifs/cifsproto.h
fs/cifs/cifssmb.c
fs/cifs/connect.c