diff options
author | Sachin Prabhu <sprabhu@redhat.com> | 2016-09-06 13:22:34 +0100 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2017-10-12 15:28:21 +0100 |
commit | 1d14078e5ba5745286c87a61d8c80f0defb77ae8 (patch) | |
tree | 5008150bf89c57d18e69eb8fddf1b584bbb8c3df | |
parent | fa0b39f071686a6c940fd175a99ff543fa88ce4b (diff) |
Fix regression which breaks DFS mounting
commit d171356ff11ab1825e456dfb979755e01b3c54a1 upstream.
Patch a6b5058 results in -EREMOTE returned by is_path_accessible() in
cifs_mount() to be ignored which breaks DFS mounting.
Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r-- | fs/cifs/connect.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 5f2a16751aa7..7ff371aa71ab 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -3638,14 +3638,16 @@ remote_path_check: goto mount_fail_check; } - rc = cifs_are_all_path_components_accessible(server, + if (rc != -EREMOTE) { + rc = cifs_are_all_path_components_accessible(server, xid, tcon, cifs_sb, full_path); - if (rc != 0) { - cifs_dbg(VFS, "cannot query dirs between root and final path, " - "enabling CIFS_MOUNT_USE_PREFIX_PATH\n"); - cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_USE_PREFIX_PATH; - rc = 0; + if (rc != 0) { + cifs_dbg(VFS, "cannot query dirs between root and final path, " + "enabling CIFS_MOUNT_USE_PREFIX_PATH\n"); + cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_USE_PREFIX_PATH; + rc = 0; + } } kfree(full_path); } |