cifs: fix max_credits implementation
authorSteve French <stfrench@microsoft.com>
Fri, 16 Jun 2023 01:30:29 +0000 (20:30 -0500)
committerSteve French <stfrench@microsoft.com>
Fri, 16 Jun 2023 01:39:00 +0000 (20:39 -0500)
commitd1602cb8de61bb24d605b80353ced4b46f35e6c4
treee9c673a4c34877c7720755c14e41c4c23c474880
parent842544557f5fb20aa90f3dd03e9f0441ff31ac85
cifs: fix max_credits implementation

The current implementation of max_credits on the client does
not work because the CreditRequest logic for several commands
does not take max_credits into account.

Still, we can end up asking the server for more credits, depending
on the number of credits in flight. For this, we need to
limit the credits while parsing the responses too.

Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/smb2ops.c
fs/cifs/smb2pdu.c