aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/connect.c
diff options
context:
space:
mode:
authorEugene Korenevsky <ekorenevsky@astralinux.ru>2022-01-14 22:53:40 +0300
committerSteve French <stfrench@microsoft.com>2022-01-17 13:28:25 -0600
commita2809d0e16963fdf3984409e47f145cccb0c6821 (patch)
tree3b92a5ea5b9971e50de2e7afb0de73d04cdf5120 /fs/cifs/connect.c
parentcifs: alloc_path_with_tree_prefix: do not append sep. if the path is empty (diff)
downloadlinux-dev-a2809d0e16963fdf3984409e47f145cccb0c6821.tar.xz
linux-dev-a2809d0e16963fdf3984409e47f145cccb0c6821.zip
cifs: quirk for STATUS_OBJECT_NAME_INVALID returned for non-ASCII dfs refs
Windows SMB server responds with STATUS_OBJECT_NAME_INVALID code to SMB2 QUERY_INFO request for "\<server>\<dfsname>\<linkpath>" DFS reference, where <dfsname> contains non-ASCII unicode symbols. Check such DFS reference and emulate -EREMOTE if it is actual. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=215440 Signed-off-by: Eugene Korenevsky <ekorenevsky@astralinux.ru> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r--fs/cifs/connect.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 0f36deff790e..accce1b351c6 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -3374,6 +3374,11 @@ static int is_path_remote(struct mount_ctx *mnt_ctx)
rc = server->ops->is_path_accessible(xid, tcon, cifs_sb,
full_path);
+#ifdef CONFIG_CIFS_DFS_UPCALL
+ if (rc == -ENOENT && is_tcon_dfs(tcon))
+ rc = cifs_dfs_query_info_nonascii_quirk(xid, tcon, cifs_sb,
+ full_path);
+#endif
if (rc != 0 && rc != -EREMOTE) {
kfree(full_path);
return rc;