]> git.baikalelectronics.ru Git - kernel.git/commit
CIFS: Fix credit computation for compounded requests
authorPavel Shilovsky <pshilov@microsoft.com>
Sat, 22 Dec 2018 20:40:05 +0000 (12:40 -0800)
committerSteve French <stfrench@microsoft.com>
Thu, 10 Jan 2019 20:32:38 +0000 (14:32 -0600)
commit9e8bb5110c8634fec84b72b5ba62c6e860a642bf
tree7c33803d72ea7bab9640f9e1b91cfb70172bdffa
parent8994c16ff1ac44ca01a12ef5c8fc9d6bb6b77f97
CIFS: Fix credit computation for compounded requests

In SMB3 protocol every part of the compound chain consumes credits
individually, so we need to call wait_for_free_credits() for each
of the PDUs in the chain. If an operation is interrupted, we must
ensure we return all credits taken from the server structure back.

Without this patch server can sometimes disconnect the session
due to credit mismatches, especially when first operation(s)
are large writes.

Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
CC: Stable <stable@vger.kernel.org>
fs/cifs/transport.c