summaryrefslogtreecommitdiff
path: root/fs/cifs/sess.c
diff options
context:
space:
mode:
authorShyam Prasad N <sprasad@microsoft.com>2021-07-19 14:26:24 +0300
committerSteve French <stfrench@microsoft.com>2021-11-13 05:27:06 +0300
commit0f2b305af944973d6fa4acdb97151efe5b64aa55 (patch)
tree9b86fa611ee2c4038a936a51cf44515c9a64ee3e /fs/cifs/sess.c
parent724244cdb3828522109c88e56a0242537aefabe9 (diff)
downloadlinux-0f2b305af944973d6fa4acdb97151efe5b64aa55.tar.xz
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 <sprasad@microsoft.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/sess.c')
-rw-r--r--fs/cifs/sess.c6
1 files changed, 1 insertions, 5 deletions
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