cifs: fix status checks in cifs_tree_connect
authorSteve French <stfrench@microsoft.com>
Fri, 16 Jun 2023 01:28:07 +0000 (20:28 -0500)
committerSteve French <stfrench@microsoft.com>
Fri, 16 Jun 2023 01:28:07 +0000 (20:28 -0500)
commit99b05ba60e75373bce29a24b1b991e319c6c315a
tree4ae013a230eae9636995bb2d3021cebcdee55504
parent5a87cc7a7b12cdccdfee308b9805ec1eaa02d3a6
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/cifs/connect.c
fs/cifs/dfs.c