CIFS: Respect reconnect in MTU credits calculations
authorPavel Shilovsky <pshilov@microsoft.com>
Wed, 16 Jan 2019 19:12:41 +0000 (11:12 -0800)
committerSteve French <stfrench@microsoft.com>
Wed, 6 Mar 2019 00:10:01 +0000 (18:10 -0600)
commit335b7b62ffb69d18055f2bb6f3a029263a07c735
tree27d3e4a9edd427da8e4bae69a4e54b37c89d661a
parent5b964852609b2826126a526851f316fc06f5e37e
CIFS: Respect reconnect in MTU credits calculations

Every time after a session reconnect we don't need to account for
credits obtained in previous sessions. Introduce new struct cifs_credits
which contains both credits value and reconnect instance of the
time those credits were taken. Modify a routine that add credits
back to handle the reconnect instance by assuming zero credits
if the reconnect happened after the credits were obtained and
before we decided to add them back due to some errors during sending.

This patch fixes the MTU credits cases. The subsequent patch
will handle non-MTU ones.

Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/cifsglob.h
fs/cifs/cifsproto.h
fs/cifs/connect.c
fs/cifs/file.c
fs/cifs/smb1ops.c
fs/cifs/smb2ops.c
fs/cifs/smb2pdu.c
fs/cifs/transport.c