summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorRonnie Sahlberg <lsahlber@redhat.com>2018-04-09 18:06:31 +1000
committerSteve French <smfrench@gmail.com>2018-04-12 20:32:53 -0500
commit05432e2938ddb8bd942e5a89298e763cf785edb6 (patch)
tree857a3c8524489de51b3c89a82922727c8770e6cc /fs
parent91cb74f5142c14dd921ab2d064b7b128054f9fae (diff)
downloadlinux-05432e2938ddb8bd942e5a89298e763cf785edb6.tar.gz
linux-05432e2938ddb8bd942e5a89298e763cf785edb6.tar.bz2
linux-05432e2938ddb8bd942e5a89298e763cf785edb6.zip
cifs: remove rfc1002 hardcoded constants from cifs_discard_remaining_data()
Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com> Signed-off-by: Steve French <smfrench@gmail.com> Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/cifssmb.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 890b3a40c79c..6d3e40d7029c 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -1418,8 +1418,9 @@ openRetry:
int
cifs_discard_remaining_data(struct TCP_Server_Info *server)
{
- unsigned int rfclen = get_rfc1002_length(server->smallbuf);
- int remaining = rfclen + 4 - server->total_read;
+ unsigned int rfclen = server->pdu_size;
+ int remaining = rfclen + server->vals->header_preamble_size -
+ server->total_read;
while (remaining > 0) {
int length;