diff options
author | Ronnie Sahlberg <lsahlber@redhat.com> | 2018-04-09 11:06:26 +0300 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2018-04-13 01:06:33 +0300 |
commit | 2e96467d9eb189b38954bcbbf1ee16762914f4cb (patch) | |
tree | 84a179ad8e3d58c31266b8852d8db976b632e186 /fs/cifs/connect.c | |
parent | 5100d8a3fe034845926266a4e7f5bdcbb859088b (diff) | |
download | linux-2e96467d9eb189b38954bcbbf1ee16762914f4cb.tar.xz |
cifs: add pdu_size to the TCP_Server_Info structure
and get rid of some get_rfc1002_length() in smb2
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/cifs/connect.c')
-rw-r--r-- | fs/cifs/connect.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 4e0808f40195..48012a0addf1 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -772,7 +772,7 @@ standard_receive3(struct TCP_Server_Info *server, struct mid_q_entry *mid) { int length; char *buf = server->smallbuf; - unsigned int pdu_length = get_rfc1002_length(buf); + unsigned int pdu_length = server->pdu_size; /* make sure this will fit in a large buffer */ if (pdu_length > CIFSMaxBufSize + MAX_HEADER_SIZE(server) - @@ -881,6 +881,7 @@ cifs_demultiplex_thread(void *p) * so we can now interpret the length field. */ pdu_length = get_rfc1002_length(buf); + server->pdu_size = pdu_length; cifs_dbg(FYI, "RFC1002 header 0x%x\n", pdu_length); if (!is_smb_response(server, buf[0])) |