smb3: fix crediting for compounding when only one request in flight
authorPavel Shilovsky <pshilov@microsoft.com>
Wed, 3 Feb 2021 04:34:32 +0000 (22:34 -0600)
committerSteve French <stfrench@microsoft.com>
Fri, 5 Feb 2021 14:12:00 +0000 (08:12 -0600)
commit91792bb8089b63b7b780251eb83939348ac58a64
tree158edc77d2e0efa02cff9f6631b54730200f928c
parent8d8d1dbefc423d42d626cf5b81aac214870ebaab
smb3: fix crediting for compounding when only one request in flight

Currently we try to guess if a compound request is going to
succeed waiting for credits or not based on the number of
requests in flight. This approach doesn't work correctly
all the time because there may be only one request in
flight which is going to bring multiple credits satisfying
the compound request.

Change the behavior to fail a request only if there are no requests
in flight at all and proceed waiting for credits otherwise.

Cc: <stable@vger.kernel.org> # 5.1+
Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
Reviewed-by: Tom Talpey <tom@talpey.com>
Reviewed-by: Shyam Prasad N <nspmangalore@gmail.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/transport.c