diff options
author | Pavel Shilovsky <pshilov@microsoft.com> | 2019-01-03 16:45:13 -0800 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2019-01-10 14:32:36 -0600 |
commit | 33fa5c8b8a7dbe6353a56eaa654b790348890d42 (patch) | |
tree | 708cde8bdf69f050239ff0f23b2deac9034a377d /fs/cifs/transport.c | |
parent | b983f7e92348d7e7d091db1b78b7915e9dd3d63a (diff) | |
download | linux-stable-33fa5c8b8a7dbe6353a56eaa654b790348890d42.tar.gz linux-stable-33fa5c8b8a7dbe6353a56eaa654b790348890d42.tar.bz2 linux-stable-33fa5c8b8a7dbe6353a56eaa654b790348890d42.zip |
CIFS: Do not set credits to 1 if the server didn't grant anything
Currently we reset the number of total credits granted by the server
to 1 if the server didn't grant us anything int the response. This
violates the SMB3 protocol - we need to trust the server and use
the credit values from the response. Fix this by removing the
corresponding code.
Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
CC: Stable <stable@vger.kernel.org>
Diffstat (limited to 'fs/cifs/transport.c')
-rw-r--r-- | fs/cifs/transport.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c index 5be7302853b6..8e75d689be46 100644 --- a/fs/cifs/transport.c +++ b/fs/cifs/transport.c @@ -894,8 +894,6 @@ compound_send_recv(const unsigned int xid, struct cifs_ses *ses, for (i = 0; i < num_rqst; i++) if (midQ[i]->resp_buf) credits += ses->server->ops->get_credits(midQ[i]); - if (!credits) - credits = 1; for (i = 0; i < num_rqst; i++) { if (rc < 0) |