cifs: nosharesock should be set on new server
authorShyam Prasad N <sprasad@microsoft.com>
Sun, 21 Nov 2021 16:45:44 +0000 (16:45 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Dec 2021 08:04:56 +0000 (09:04 +0100)
commitd841c6720fb24dda402d3fcc08eda6ad4efa457c
tree6aeae243159b57e87acf397a02ddbad1a04f84ac
parentc9c8c054a01ca6259cd380641cd21bfce791d124
cifs: nosharesock should be set on new server

commit b9ad6b5b687e798746024e5fc4574d8fa8bdfade upstream.

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: c9f1c19cf7c5 (cifs: nosharesock should not share socket with future sessions)
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/connect.c