diff options
author | Paulo Alcantara <pc@manguebit.com> | 2023-06-27 21:24:50 -0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2023-06-28 15:49:02 -0500 |
commit | 5f2a0afa9890e728428db2ed9281bddca242e90b (patch) | |
tree | 8f53e5ac09b9760f27190ca67f46da02f7dfc088 /fs/smb/client/dfs.c | |
parent | 3ae872de410751fe5e629e04da491a632d95201c (diff) |
smb: client: improve DFS mount check
Some servers may return error codes from REQ_GET_DFS_REFERRAL requests
that are unexpected by the client, so to make it easier, assume
non-DFS mounts when the client can't get the initial DFS referral of
@ctx->UNC in dfs_mount_share().
Signed-off-by: Paulo Alcantara (SUSE) <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/smb/client/dfs.c')
-rw-r--r-- | fs/smb/client/dfs.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/smb/client/dfs.c b/fs/smb/client/dfs.c index dd06b8a0ff7a..26d14dd0482e 100644 --- a/fs/smb/client/dfs.c +++ b/fs/smb/client/dfs.c @@ -264,8 +264,9 @@ int dfs_mount_share(struct cifs_mount_ctx *mnt_ctx, bool *isdfs) if (!nodfs) { rc = dfs_get_referral(mnt_ctx, ctx->UNC + 1, NULL, NULL); if (rc) { - if (rc != -ENOENT && rc != -EOPNOTSUPP && rc != -EIO) - return rc; + cifs_dbg(FYI, "%s: no dfs referral for %s: %d\n", + __func__, ctx->UNC + 1, rc); + cifs_dbg(FYI, "%s: assuming non-dfs mount...\n", __func__); nodfs = true; } } |