diff options
author | Sachin Prabhu <sprabhu@redhat.com> | 2016-09-06 13:22:34 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-10-28 03:45:27 -0400 |
commit | 38c7c171b160f84113c10e9428e03ed4dc33cfe6 (patch) | |
tree | 7980e0d127794713653b21f985debdc84ee8f75b | |
parent | 917395fb15dcdf94c019ae3d1137fdbb519b56b0 (diff) | |
download | lwn-38c7c171b160f84113c10e9428e03ed4dc33cfe6.tar.gz lwn-38c7c171b160f84113c10e9428e03ed4dc33cfe6.zip |
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-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 c841244a954d..7b67179521cf 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -3688,14 +3688,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); } |