* gives us the latter, so we must adjust the result.
         */
        mnt = ERR_PTR(-ENOMEM);
-       full_path = build_path_from_dentry(mntpt);
+
+       /* always use tree name prefix */
+       full_path = build_path_from_dentry_optional_prefix(mntpt, true);
        if (full_path == NULL)
                goto cdda_exit;
 
 
 extern int init_cifs_spnego(void);
 extern void exit_cifs_spnego(void);
 extern char *build_path_from_dentry(struct dentry *);
+extern char *build_path_from_dentry_optional_prefix(struct dentry *direntry,
+                                                   bool prefix);
 extern char *cifs_build_path_to_root(struct smb_vol *vol,
                                     struct cifs_sb_info *cifs_sb,
                                     struct cifs_tcon *tcon,
 
 /* Note: caller must free return buffer */
 char *
 build_path_from_dentry(struct dentry *direntry)
+{
+       struct cifs_sb_info *cifs_sb = CIFS_SB(direntry->d_sb);
+       struct cifs_tcon *tcon = cifs_sb_master_tcon(cifs_sb);
+       bool prefix = tcon->Flags & SMB_SHARE_IS_IN_DFS;
+
+       return build_path_from_dentry_optional_prefix(direntry,
+                                                     prefix);
+}
+
+char *
+build_path_from_dentry_optional_prefix(struct dentry *direntry, bool prefix)
 {
        struct dentry *temp;
        int namelen;
        unsigned seq;
 
        dirsep = CIFS_DIR_SEP(cifs_sb);
-       if (tcon->Flags & SMB_SHARE_IS_IN_DFS)
+       if (prefix)
                dfsplen = strnlen(tcon->treeName, MAX_TREE_SIZE + 1);
        else
                dfsplen = 0;