]> git.itanic.dy.fi Git - linux-stable/commitdiff
cifs: fix smb1 mount regression
authorPaulo Alcantara <pc@manguebit.com>
Tue, 23 May 2023 20:38:38 +0000 (17:38 -0300)
committerSteve French <stfrench@microsoft.com>
Wed, 24 May 2023 21:22:44 +0000 (16:22 -0500)
cifs.ko maps NT_STATUS_NOT_FOUND to -EIO when SMB1 servers couldn't
resolve referral paths.  Proceed to tree connect when we get -EIO from
dfs_get_referral() as well.

Reported-by: Kris Karas (Bug Reporting) <bugs-a21@moonlit-rail.com>
Tested-by: Woody Suwalski <terraluna977@gmail.com>
Fixes: 8e3554150d6c ("cifs: fix sharing of DFS connections")
Cc: stable@vger.kernel.org # v6.2+
Signed-off-by: Paulo Alcantara (SUSE) <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/dfs.c

index a93dbca1411b25b941703d06eb795e54b37a37d8..2f93bf8c3325ac3d090600a21e3e660306dbc74c 100644 (file)
@@ -303,7 +303,7 @@ 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)
+                       if (rc != -ENOENT && rc != -EOPNOTSUPP && rc != -EIO)
                                goto out;
                        nodfs = true;
                }