cifs: fix credit accounting for extra channel
authorAurelien Aptel <aaptel@suse.com>
Thu, 4 Mar 2021 17:42:21 +0000 (17:42 +0000)
committerSteve French <stfrench@microsoft.com>
Sat, 6 Mar 2021 17:35:57 +0000 (11:35 -0600)
commita249cc8bc2e2fed680047d326eb9a50756724198
tree9f1df6e5f50414aef1d8f609b4a2dfc07dc368d7
parenta38fd8748464831584a19438cbb3082b5a2dab15
cifs: fix credit accounting for extra channel

With multichannel, operations like the queries
from "ls -lR" can cause all credits to be used and
errors to be returned since max_credits was not
being set correctly on the secondary channels and
thus the client was requesting 0 credits incorrectly
in some cases (which can lead to not having
enough credits to perform any operation on that
channel).

Signed-off-by: Aurelien Aptel <aaptel@suse.com>
CC: <stable@vger.kernel.org> # v5.8+
Reviewed-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/connect.c
fs/cifs/sess.c