Re: [PATCH 4/4] smb: client: improve DFS mount check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tentatively merged all 4 into cifs-2.6.git for-next pending additional
review and testing

On Tue, Jun 27, 2023 at 7:25 PM Paulo Alcantara <pc@xxxxxxxxxxxxx> wrote:
>
> 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>
> ---
>  fs/smb/client/dfs.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/fs/smb/client/dfs.c b/fs/smb/client/dfs.c
> index afbaef05a1f1..a7f2e0608adf 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;
>                 }
>         }
> --
> 2.41.0
>


-- 
Thanks,

Steve




[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux