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.
Unified · Split
| @@ -3924,7 +3924,8 @@ cifs_setup_session(const unsigned int xid, struct cifs_ses *ses, · 3923 unmodified lines | |||
| 3924 | 3924 | ||
| 3925 | /* only send once per connect */ | 3925 | /* only send once per connect */ |
| 3926 | spin_lock(&cifs_tcp_ses_lock); | 3926 | spin_lock(&cifs_tcp_ses_lock); |
| 3927 | if (server->tcpStatus != CifsNeedSessSetup) { | 3927 | if ((server->tcpStatus != CifsNeedSessSetup) && |
| 3928 | (ses->status == CifsGood)) { | ||
| 3928 | spin_unlock(&cifs_tcp_ses_lock); | 3929 | spin_unlock(&cifs_tcp_ses_lock); |
| 3929 | return 0; | 3930 | return 0; |
| 3930 | } | 3931 | } |