Commit 685957ca authored by Sachin Prabhu's avatar Sachin Prabhu Committed by Willy Tarreau

Move check for prefix path to within cifs_get_root()

commit 348c1bfa upstream.
Signed-off-by: default avatarSachin Prabhu <sprabhu@redhat.com>
Tested-by: default avatarAurelien Aptel <aaptel@suse.com>
Signed-off-by: default avatarSteve French <smfrench@gmail.com>
Acked-by: default avatarAurelien Aptel <aaptel@suse.com>
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
Signed-off-by: default avatarWilly Tarreau <w@1wt.eu>
parent 5c33dcb4
...@@ -565,6 +565,9 @@ cifs_get_root(struct smb_vol *vol, struct super_block *sb) ...@@ -565,6 +565,9 @@ cifs_get_root(struct smb_vol *vol, struct super_block *sb)
char *s, *p; char *s, *p;
char sep; 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, full_path = cifs_build_path_to_root(vol, cifs_sb,
cifs_sb_master_tcon(cifs_sb)); cifs_sb_master_tcon(cifs_sb));
if (full_path == NULL) if (full_path == NULL)
...@@ -689,11 +692,7 @@ cifs_do_mount(struct file_system_type *fs_type, ...@@ -689,11 +692,7 @@ cifs_do_mount(struct file_system_type *fs_type,
sb->s_flags |= MS_ACTIVE; sb->s_flags |= MS_ACTIVE;
} }
if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_USE_PREFIX_PATH) root = cifs_get_root(volume_info, sb);
root = dget(sb->s_root);
else
root = cifs_get_root(volume_info, sb);
if (IS_ERR(root)) if (IS_ERR(root))
goto out_super; goto out_super;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment