diff options
author | Shyam Prasad N <sprasad@microsoft.com> | 2021-07-19 14:26:24 +0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2021-11-13 05:27:06 +0300 |
commit | 0f2b305af944973d6fa4acdb97151efe5b64aa55 (patch) | |
tree | 9b86fa611ee2c4038a936a51cf44515c9a64ee3e /fs/cifs/cifsglob.h | |
parent | 724244cdb3828522109c88e56a0242537aefabe9 (diff) | |
download | linux-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/cifsglob.h')
-rw-r--r-- | fs/cifs/cifsglob.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index 3c18c56a119b..be74606724c7 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h @@ -690,7 +690,15 @@ struct TCP_Server_Info { */ int nr_targets; bool noblockcnt; /* use non-blocking connect() */ - bool is_channel; /* if a session channel */ + + /* + * If this is a session channel, + * primary_server holds the ref-counted + * pointer to primary channel connection for the session. + */ +#define CIFS_SERVER_IS_CHAN(server) (!!(server)->primary_server) + struct TCP_Server_Info *primary_server; + #ifdef CONFIG_CIFS_SWN_UPCALL bool use_swn_dstaddr; struct sockaddr_storage swn_dstaddr; |