Commit b9ad6b5b authored by Shyam Prasad N's avatar Shyam Prasad N Committed by Steve French

cifs: nosharesock should be set on new server

Recent fix to maintain a nosharesock state on the
server struct caused a regression. It updated this
field in the old tcp session, and not the new one.

This caused the multichannel scenario to misbehave.

Fixes: c9f1c19c (cifs: nosharesock should not share socket with future sessions)
Signed-off-by: default avatarShyam Prasad N <sprasad@microsoft.com>
Reviewed-by: default avatarPaulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 13605725
...@@ -1271,10 +1271,8 @@ static int match_server(struct TCP_Server_Info *server, struct smb3_fs_context * ...@@ -1271,10 +1271,8 @@ static int match_server(struct TCP_Server_Info *server, struct smb3_fs_context *
{ {
struct sockaddr *addr = (struct sockaddr *)&ctx->dstaddr; struct sockaddr *addr = (struct sockaddr *)&ctx->dstaddr;
if (ctx->nosharesock) { if (ctx->nosharesock)
server->nosharesock = true;
return 0; return 0;
}
/* this server does not share socket */ /* this server does not share socket */
if (server->nosharesock) if (server->nosharesock)
...@@ -1438,6 +1436,9 @@ cifs_get_tcp_session(struct smb3_fs_context *ctx, ...@@ -1438,6 +1436,9 @@ cifs_get_tcp_session(struct smb3_fs_context *ctx,
goto out_err; goto out_err;
} }
if (ctx->nosharesock)
tcp_ses->nosharesock = true;
tcp_ses->ops = ctx->ops; tcp_ses->ops = ctx->ops;
tcp_ses->vals = ctx->vals; tcp_ses->vals = ctx->vals;
cifs_set_net_ns(tcp_ses, get_net(current->nsproxy->net_ns)); cifs_set_net_ns(tcp_ses, get_net(current->nsproxy->net_ns));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment