aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-03-18 12:22:15 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2022-03-18 12:22:15 -0700
commit6e4069881a7f9dceb6dfb97e436d55e3c7f43e81 (patch)
tree28adadbae82a0c5a9319e8378682cc0c8b1062c5
parent6c4bcd8140770f8190a8e691aff0e3550069edb1 (diff)
parente3ee9fb22652f228225c352bd4fabec330cac5f0 (diff)
downloadlinux-6e4069881a7f9dceb6dfb97e436d55e3c7f43e81.tar.gz
Merge tag '5.17-rc8-smb3-fix' of git://git.samba.org/sfrench/cifs-2.6
Pull cifs fix from Steve French: "Small fix for regression in multiuser mounts. The additional improvements suggested by Ronnie to make the server and session status handling code easier to read can wait for the 5.18 merge window." * tag '5.17-rc8-smb3-fix' of git://git.samba.org/sfrench/cifs-2.6: smb3: fix incorrect session setup check for multiuser mounts
-rw-r--r--fs/cifs/connect.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 053cb449eb16..d3020abfe404 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -3924,7 +3924,8 @@ cifs_setup_session(const unsigned int xid, struct cifs_ses *ses,
/* only send once per connect */
spin_lock(&cifs_tcp_ses_lock);
- if (server->tcpStatus != CifsNeedSessSetup) {
+ if ((server->tcpStatus != CifsNeedSessSetup) &&
+ (ses->status == CifsGood)) {
spin_unlock(&cifs_tcp_ses_lock);
return 0;
}