From: Sachin Prabhu Date: Tue, 6 Sep 2016 12:22:34 +0000 (+0100) Subject: Fix regression which breaks DFS mounting X-Git-Tag: v4.1.12-110.0.20170822_0730~43 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=029be90b2a027b8f746d79d66d7b7da4f66a9cd9;p=users%2Fjedix%2Flinux-maple.git Fix regression which breaks DFS mounting Orabug: 26591404 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 Reviewed-by: Aurelien Aptel CC: Stable Signed-off-by: Steve French (cherry picked from commit d171356ff11ab1825e456dfb979755e01b3c54a1) Signed-off-by: Somasundaram Krishnasamy Reviewed-by: Jack Vogel --- diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 7ab953fd9fb6f..4fcd6f1b34848 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -3599,14 +3599,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); }