CIFS: Do not set credits to 1 if the server didn't grant anything
authorPavel Shilovsky <pshilov@microsoft.com>
Fri, 4 Jan 2019 00:45:13 +0000 (16:45 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Jan 2019 21:04:30 +0000 (22:04 +0100)
commitc3606c64678369dc108f397109569cfa0ce0c101
treed848e785e08127d357e83e6867c1e50843c0fcf5
parentd1130682d1270495f49282535854221bbdf20638
CIFS: Do not set credits to 1 if the server didn't grant anything

commit 33fa5c8b8a7dbe6353a56eaa654b790348890d42 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/transport.c