cifs: Fix mount options set in automount
authorPaulo Alcantara (SUSE) <pc@cjr.nz>
Thu, 9 Jan 2020 13:03:19 +0000 (10:03 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Feb 2020 07:36:58 +0000 (08:36 +0100)
commit9c5ede115a6ef04ea04c40c6cf90510880902628
tree4d776b516e63606a4cb1f8017b0ad263ae6bf988
parent1d8e40cf86e4f94073e0dcefad0145fc81d3e66a
cifs: Fix mount options set in automount

[ Upstream commit 5739375ee4230980166807d347cc21c305532bbc ]

Starting from 4a367dc04435, we must set the mount options based on the
DFS full path rather than the resolved target, that is, cifs_mount()
will be responsible for resolving the DFS link (cached) as well as
performing failover to any other targets in the referral.

Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Reported-by: Martijn de Gouw <martijn.de.gouw@prodrive-technologies.com>
Fixes: 4a367dc04435 ("cifs: Add support for failover in cifs_mount()")
Link: https://lore.kernel.org/linux-cifs/39643d7d-2abb-14d3-ced6-c394fab9a777@prodrive-technologies.com
Tested-by: Martijn de Gouw <martijn.de.gouw@prodrive-technologies.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/cifs/cifs_dfs_ref.c