summaryrefslogtreecommitdiff
path: root/fs/cifs/connect.c
diff options
context:
space:
mode:
authorAurelien Aptel <aaptel@suse.com>2019-09-20 07:22:14 +0300
committerSteve French <stfrench@microsoft.com>2019-11-25 10:16:30 +0300
commitf6a6bf7c4d53837767125e635e7d7d0dc48ee59e (patch)
treede39238ea6e7e483515f744a97c05e70decb7b9c /fs/cifs/connect.c
parentf780bd3fef17c4fda12e9c50e28e91c0e18cf448 (diff)
downloadlinux-f6a6bf7c4d53837767125e635e7d7d0dc48ee59e.tar.xz
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 'fs/cifs/connect.c')
-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)