]> git.baikalelectronics.ru Git - kernel.git/commit
CIFS: Move credit processing to mid callbacks for SMB3
authorPavel Shilovsky <pshilov@microsoft.com>
Thu, 3 Jan 2019 23:53:10 +0000 (15:53 -0800)
committerSteve French <stfrench@microsoft.com>
Fri, 11 Jan 2019 13:14:40 +0000 (07:14 -0600)
commit842f9084344e76a40446f41933d748a93dba404b
tree991de226bd43c69104941534b559dca680047b2c
parent27defb7d73af63d22adb89785b7f678341a013e7
CIFS: Move credit processing to mid callbacks for SMB3

Currently we account for credits in the thread initiating a request
and waiting for a response. The demultiplex thread receives the response,
wakes up the thread and the latter collects credits from the response
buffer and add them to the server structure on the client. This approach
is not accurate, because it may race with reconnect events in the
demultiplex thread which resets the number of credits.

Fix this by moving credit processing to new mid callbacks that collect
credits granted by the server from the response in the demultiplex thread.

Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/transport.c