CIFS: Adjust MTU credits before reopening a file
authorPavel Shilovsky <pshilov@microsoft.com>
Thu, 24 Jan 2019 02:15:52 +0000 (18:15 -0800)
committerSteve French <stfrench@microsoft.com>
Wed, 6 Mar 2019 00:10:01 +0000 (18:10 -0600)
commit9a1c67e8d5dad143d5166dac1ee6776f433dac00
tree3af988a600e442519eb6cee59b8dec7499b1c3e5
parent97ea499883cc0566b1fafdc12ca49d0926aab332
CIFS: Adjust MTU credits before reopening a file

Currently we adjust MTU credits before sending an IO request
and after reopening a file. This approach doesn't allow the
reopen routine to use existing credits that are not needed
for IO. Reorder credit adjustment and reopening a file to
use credits available to the client more efficiently. Also
unwrap complex if statement into few pieces to improve
readability.

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