cifs: fix status checks in cifs_tree_connect
authorShyam Prasad N <sprasad@microsoft.com>
Fri, 9 Jun 2023 17:46:54 +0000 (17:46 +0000)
committerSteve French <stfrench@microsoft.com>
Mon, 12 Jun 2023 01:52:48 +0000 (20:52 -0500)
commit91f4480c41f56f7c723323cf7f581f1d95d9ffbc
treed67702910335ed217ddcfa87c7162c78a4f4eb83
parenta5998a9ec3c03297a5b7f3df5c1979cd469a0da3
cifs: fix status checks in cifs_tree_connect

The ordering of status checks at the beginning of
cifs_tree_connect is wrong. As a result, a tcon
which is good may stay marked as needing reconnect
infinitely.

Fixes: 2f0e4f034220 ("cifs: check only tcon status on tcon related functions")
Cc: stable@vger.kernel.org # 6.3
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/connect.c
fs/smb/client/dfs.c