diff options
author | David Howells <dhowells@redhat.com> | 2021-02-04 09:15:21 +0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2021-02-26 04:08:06 +0300 |
commit | cf0604a686b11175d8beae60281c4ccc95aaa5c2 (patch) | |
tree | 62ad782990865ba28f748e9e780925e1cc7a7693 /fs/cifs/cifsproto.h | |
parent | 5ff2836ed3a5c24420a7235be25a462594cdc4ea (diff) | |
download | linux-cf0604a686b11175d8beae60281c4ccc95aaa5c2.tar.xz |
cifs: use discard iterator to discard unneeded network data more efficiently
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>
Diffstat (limited to 'fs/cifs/cifsproto.h')
-rw-r--r-- | fs/cifs/cifsproto.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h index 32f7a013402e..75ce6f742b8d 100644 --- a/fs/cifs/cifsproto.h +++ b/fs/cifs/cifsproto.h @@ -232,6 +232,8 @@ extern unsigned int setup_special_user_owner_ACE(struct cifs_ace *pace); extern void dequeue_mid(struct mid_q_entry *mid, bool malformed); extern int cifs_read_from_socket(struct TCP_Server_Info *server, char *buf, unsigned int to_read); +extern ssize_t cifs_discard_from_socket(struct TCP_Server_Info *server, + size_t to_read); extern int cifs_read_page_from_socket(struct TCP_Server_Info *server, struct page *page, unsigned int page_offset, |