]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
cifs: cifs_inval_name_dfs_link_error: correct the check for fullpath
authorGleb Korobeynikov <gkorobeynikov@astralinux.ru>
Thu, 8 Aug 2024 15:47:48 +0000 (18:47 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Aug 2024 13:34:24 +0000 (15:34 +0200)
commitbc7467911d66fe0b187ca367afff07051a9bc17d
tree08f76f013d6d6e56e92ca087727dd39badaa2fe4
parentf1c03386567c7c8744979eecd4d27b269c5c7788
cifs: cifs_inval_name_dfs_link_error: correct the check for fullpath

[ Upstream commit 36bb22a08a69d9984a8399c07310d18b115eae20 ]

Replace the always-true check tcon->origin_fullpath with
check of server->leaf_fullpath

See https://bugzilla.kernel.org/show_bug.cgi?id=219083

The check of the new @tcon will always be true during mounting,
since @tcon->origin_fullpath will only be set after the tree is
connected to the latest common resource, as well as checking if
the prefix paths from it are fully accessible.

Fixes: 3ae872de4107 ("smb: client: fix shared DFS root mounts with different prefixes")
Reviewed-by: Paulo Alcantara (Red Hat) <pc@manguebit.com>
Signed-off-by: Gleb Korobeynikov <gkorobeynikov@astralinux.ru>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/smb/client/misc.c