]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Jun 2023 09:13:56 +0000 (11:13 +0200)
commitafb49c5af04b32c6d598f676f875456936d0f225
treeb692f43653930fd5a6cfc77bc34e189908f7a18a
parent00d3ac724541a0661b148b16cf34fac135a4fd53
cifs: fix status checks in cifs_tree_connect

[ Upstream commit 91f4480c41f56f7c723323cf7f581f1d95d9ffbc ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/cifs/connect.c
fs/cifs/dfs.c