|
@@ -80,6 +80,17 @@ cifs_build_path_to_root(struct smb_vol *vol, struct cifs_sb_info *cifs_sb,
|
|
|
/* 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;
|
|
@@ -92,7 +103,7 @@ build_path_from_dentry(struct dentry *direntry)
|
|
|
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;
|