This is a note to let you know that I've just added the patch titled smb: client: improve DFS mount check to the 6.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: smb-client-improve-dfs-mount-check.patch and it can be found in the queue-6.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 5f2a0afa9890e728428db2ed9281bddca242e90b Mon Sep 17 00:00:00 2001 From: Paulo Alcantara <pc@xxxxxxxxxxxxx> Date: Tue, 27 Jun 2023 21:24:50 -0300 Subject: smb: client: improve DFS mount check From: Paulo Alcantara <pc@xxxxxxxxxxxxx> commit 5f2a0afa9890e728428db2ed9281bddca242e90b upstream. 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@xxxxxxxxxxxxx> Signed-off-by: Steve French <stfrench@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/smb/client/dfs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- a/fs/smb/client/dfs.c +++ b/fs/smb/client/dfs.c @@ -296,8 +296,9 @@ int dfs_mount_share(struct cifs_mount_ct 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; } } Patches currently in stable-queue which might be from pc@xxxxxxxxxxxxx are queue-6.4/smb-client-fix-parsing-of-source-mount-option.patch queue-6.4/smb-client-improve-dfs-mount-check.patch