History

smb3: fix incorrect session setup check for multiuser mounts

A recent change to how the SMB3 server (socket) and session status is managed regressed multiuser mounts by changing the check for whether session setup is needed to the socket (TCP_Server_info) structure instead of the session struct (cifs_ses). Add additional check in cifs_setup_sesion to fix this.

Steve French committed 4 years ago

Commit e3ee9fb1 parent 09688c01 file · +2 −1Browse files

Unified · Split

fs/cifs/connect.c+2−1
@@ -3924,7 +3924,8 @@ cifs_setup_session(const unsigned int xid, struct cifs_ses *ses, · 3923 unmodified lines
39243924
39253925 /* only send once per connect */
39263926 spin_lock(&cifs_tcp_ses_lock);
3927− if (server->tcpStatus != CifsNeedSessSetup) {
3927+ if ((server->tcpStatus != CifsNeedSessSetup) &&
3928+ (ses->status == CifsGood)) {
39283929 spin_unlock(&cifs_tcp_ses_lock);
39293930 return 0;
39303931 }