diff options
author | Aurelien Aptel <aaptel@suse.com> | 2021-03-04 17:42:21 +0000 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2021-03-06 11:35:57 -0600 |
commit | a249cc8bc2e2fed680047d326eb9a50756724198 (patch) | |
tree | 9f1df6e5f50414aef1d8f609b4a2dfc07dc368d7 /fs/cifs/sess.c | |
parent | a38fd8748464831584a19438cbb3082b5a2dab15 (diff) |
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>
Diffstat (limited to 'fs/cifs/sess.c')
-rw-r--r-- | fs/cifs/sess.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c index 183a3a868d7b..63d517b9f2ff 100644 --- a/fs/cifs/sess.c +++ b/fs/cifs/sess.c @@ -230,6 +230,7 @@ cifs_ses_add_channel(struct cifs_sb_info *cifs_sb, struct cifs_ses *ses, ctx.noautotune = ses->server->noautotune; ctx.sockopt_tcp_nodelay = ses->server->tcp_nodelay; ctx.echo_interval = ses->server->echo_interval / HZ; + ctx.max_credits = ses->server->max_credits; /* * This will be used for encoding/decoding user/domain/pw |