Skip to content

Commit d171356

Browse files
spuiuksmfrench
authored andcommitted
Fix regression which breaks DFS mounting
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 <[email protected]> Reviewed-by: Aurelien Aptel <[email protected]> CC: Stable <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent 94f8737 commit d171356

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

fs/cifs/connect.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3688,14 +3688,16 @@ cifs_mount(struct cifs_sb_info *cifs_sb, struct smb_vol *volume_info)
36883688
goto mount_fail_check;
36893689
}
36903690

3691-
rc = cifs_are_all_path_components_accessible(server,
3691+
if (rc != -EREMOTE) {
3692+
rc = cifs_are_all_path_components_accessible(server,
36923693
xid, tcon, cifs_sb,
36933694
full_path);
3694-
if (rc != 0) {
3695-
cifs_dbg(VFS, "cannot query dirs between root and final path, "
3696-
"enabling CIFS_MOUNT_USE_PREFIX_PATH\n");
3697-
cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_USE_PREFIX_PATH;
3698-
rc = 0;
3695+
if (rc != 0) {
3696+
cifs_dbg(VFS, "cannot query dirs between root and final path, "
3697+
"enabling CIFS_MOUNT_USE_PREFIX_PATH\n");
3698+
cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_USE_PREFIX_PATH;
3699+
rc = 0;
3700+
}
36993701
}
37003702
kfree(full_path);
37013703
}

0 commit comments

Comments
 (0)