From 0f2b305af944973d6fa4acdb97151efe5b64aa55 Mon Sep 17 00:00:00 2001 From: Shyam Prasad N Date: Mon, 19 Jul 2021 11:26:24 +0000 Subject: cifs: connect individual channel servers to primary channel server Today, we don't have any way to get the smb session for any of the secondary channels. Introducing a pointer to the primary server from server struct of any secondary channel. The value will be NULL for the server of the primary channel. This will enable us to get the smb session for any channel. This will be needed for some of the changes that I'm planning to make soon. Signed-off-by: Shyam Prasad N Signed-off-by: Steve French --- fs/cifs/sess.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'fs/cifs/sess.c') diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c index 27660bffb918..2c10b186ed6e 100644 --- a/fs/cifs/sess.c +++ b/fs/cifs/sess.c @@ -258,7 +258,7 @@ cifs_ses_add_channel(struct cifs_sb_info *cifs_sb, struct cifs_ses *ses, SMB2_CLIENT_GUID_SIZE); ctx.use_client_guid = true; - chan_server = cifs_get_tcp_session(&ctx); + chan_server = cifs_get_tcp_session(&ctx, ses->server); mutex_lock(&ses->session_mutex); spin_lock(&ses->chan_lock); @@ -272,10 +272,6 @@ cifs_ses_add_channel(struct cifs_sb_info *cifs_sb, struct cifs_ses *ses, } spin_unlock(&ses->chan_lock); - spin_lock(&cifs_tcp_ses_lock); - chan->server->is_channel = true; - spin_unlock(&cifs_tcp_ses_lock); - /* * We need to allocate the server crypto now as we will need * to sign packets before we generate the channel signing key -- cgit v1.2.3