Commit 278e9173 authored by David Howells's avatar David Howells Committed by Jialin Zhang
Browse files

cifs: use discard iterator to discard unneeded network data more efficiently

stable inclusion
from stable-v5.10.146
commit 877231b0e67845c351b3ef4b5b5943c1e77b8ee9
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I6D0VX

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=877231b0e67845c351b3ef4b5b5943c1e77b8ee9



--------------------------------

[ Upstream commit cf0604a6 ]

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: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
Stable-dep-of: bedc8f76 ("cifs: always initialize struct msghdr smb_msg completely")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
Reviewed-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 24f665cd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment