Skip to content

Commit

Permalink
Move check for prefix path to within cifs_get_root()
Browse files Browse the repository at this point in the history
Signed-off-by: Sachin Prabhu <[email protected]>
Tested-by: Aurelien Aptel <[email protected]>
Signed-off-by: Steve French <[email protected]>
  • Loading branch information
spuiuk authored and smfrench committed Sep 10, 2016
1 parent c1d8b24 commit 348c1bf
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions fs/cifs/cifsfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,9 @@ cifs_get_root(struct smb_vol *vol, struct super_block *sb)
char *s, *p;
char sep;

if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_USE_PREFIX_PATH)
return dget(sb->s_root);

full_path = cifs_build_path_to_root(vol, cifs_sb,
cifs_sb_master_tcon(cifs_sb));
if (full_path == NULL)
Expand Down Expand Up @@ -731,11 +734,7 @@ cifs_do_mount(struct file_system_type *fs_type,
sb->s_flags |= MS_ACTIVE;
}

if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_USE_PREFIX_PATH)
root = dget(sb->s_root);
else
root = cifs_get_root(volume_info, sb);

root = cifs_get_root(volume_info, sb);
if (IS_ERR(root))
goto out_super;

Expand Down

0 comments on commit 348c1bf

Please sign in to comment.