aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/connect.c
diff options
context:
space:
mode:
authorAurelien Aptel <aaptel@suse.com>2019-09-20 06:22:14 +0200
committerSteve French <stfrench@microsoft.com>2019-11-25 01:16:30 -0600
commitf6a6bf7c4d53837767125e635e7d7d0dc48ee59e (patch)
treede39238ea6e7e483515f744a97c05e70decb7b9c /fs/cifs/connect.c
parentcifs: add server param (diff)
downloadlinux-dev-f6a6bf7c4d53837767125e635e7d7d0dc48ee59e.tar.xz
linux-dev-f6a6bf7c4d53837767125e635e7d7d0dc48ee59e.zip
cifs: switch servers depending on binding state
Currently a lot of the code to initialize a connection & session uses the cifs_ses as input. But depending on if we are opening a new session or a new channel we need to use different server pointers. Add a "binding" flag in cifs_ses and a helper function that returns the server ptr a session should use (only in the sess establishment code path). Signed-off-by: Aurelien Aptel <aaptel@suse.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to '')
-rw-r--r--fs/cifs/connect.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 1a7d14a20ceb..7783dc1a1ed0 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -5185,7 +5185,7 @@ int
cifs_negotiate_protocol(const unsigned int xid, struct cifs_ses *ses)
{
int rc = 0;
- struct TCP_Server_Info *server = ses->server;
+ struct TCP_Server_Info *server = cifs_ses_server(ses);
if (!server->ops->need_neg || !server->ops->negotiate)
return -ENOSYS;
@@ -5212,7 +5212,7 @@ cifs_setup_session(const unsigned int xid, struct cifs_ses *ses,
struct nls_table *nls_info)
{
int rc = -ENOSYS;
- struct TCP_Server_Info *server = ses->server;
+ struct TCP_Server_Info *server = cifs_ses_server(ses);
ses->capabilities = server->capabilities;
if (linuxExtEnabled == 0)