summaryrefslogtreecommitdiff
path: root/fs/cifs/connect.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r--fs/cifs/connect.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index ad3ecda1314d..fa359f473e3d 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -2629,6 +2629,11 @@ smbd_connected:
tcp_ses->min_offload = volume_info->min_offload;
tcp_ses->tcpStatus = CifsNeedNegotiate;
+ if ((volume_info->max_credits < 20) || (volume_info->max_credits > 60000))
+ tcp_ses->max_credits = SMB2_MAX_CREDITS_AVAILABLE;
+ else
+ tcp_ses->max_credits = volume_info->max_credits;
+
tcp_ses->nr_targets = 1;
tcp_ses->ignore_signature = volume_info->ignore_signature;
/* thread spawned, put it on the list */
@@ -4077,11 +4082,6 @@ static int mount_get_conns(struct smb_vol *vol, struct cifs_sb_info *cifs_sb,
*nserver = server;
- if ((vol->max_credits < 20) || (vol->max_credits > 60000))
- server->max_credits = SMB2_MAX_CREDITS_AVAILABLE;
- else
- server->max_credits = vol->max_credits;
-
/* get a reference to a SMB session */
ses = cifs_get_smb_ses(server, vol);
if (IS_ERR(ses)) {