Skip to content

Commit 5f2a0af

Browse files
Paulo AlcantaraSteve French
authored andcommitted
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) <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent 3ae872d commit 5f2a0af

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

fs/smb/client/dfs.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,9 @@ int dfs_mount_share(struct cifs_mount_ctx *mnt_ctx, bool *isdfs)
264264
if (!nodfs) {
265265
rc = dfs_get_referral(mnt_ctx, ctx->UNC + 1, NULL, NULL);
266266
if (rc) {
267-
if (rc != -ENOENT && rc != -EOPNOTSUPP && rc != -EIO)
268-
return rc;
267+
cifs_dbg(FYI, "%s: no dfs referral for %s: %d\n",
268+
__func__, ctx->UNC + 1, rc);
269+
cifs_dbg(FYI, "%s: assuming non-dfs mount...\n", __func__);
269270
nodfs = true;
270271
}
271272
}

0 commit comments

Comments
 (0)