[11/15] CIFS: Set reconnect instance to one initially
diff mbox series

Message ID 1548277845-6746-12-git-send-email-pshilov@microsoft.com
State New
Headers show
Series
  • Improve credits handling on reconnects
Related show

Commit Message

Pavel Shilovsky Jan. 23, 2019, 9:10 p.m. UTC
Currently we set reconnect instance to zero on the first
connection but this is not convenient because we need to
reserve some special value for credit handling on reconnects
which is coming in subsequent patches. Fix this by starting
with one when initiating a new TCP connection.

Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
---
 fs/cifs/connect.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index dc02b6d..3e7ad68 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -2588,7 +2588,7 @@  cifs_get_tcp_session(struct smb_vol *volume_info)
 		volume_info->target_rfc1001_name, RFC1001_NAME_LEN_WITH_NULL);
 	tcp_ses->session_estab = false;
 	tcp_ses->sequence_number = 0;
-	tcp_ses->reconnect_instance = 0;
+	tcp_ses->reconnect_instance = 1;
 	tcp_ses->lstrp = jiffies;
 	spin_lock_init(&tcp_ses->req_lock);
 	INIT_LIST_HEAD(&tcp_ses->tcp_ses_list);