diff options
Diffstat (limited to 'fs/cifs/inode.c')
-rw-r--r-- | fs/cifs/inode.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index 9b018c8334fa..a7b2dcd4a53e 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c | |||
@@ -764,20 +764,10 @@ char *cifs_build_path_to_root(struct smb_vol *vol, struct cifs_sb_info *cifs_sb, | |||
764 | if (full_path == NULL) | 764 | if (full_path == NULL) |
765 | return full_path; | 765 | return full_path; |
766 | 766 | ||
767 | if (dfsplen) { | 767 | if (dfsplen) |
768 | strncpy(full_path, tcon->treeName, dfsplen); | 768 | strncpy(full_path, tcon->treeName, dfsplen); |
769 | /* switch slash direction in prepath depending on whether | ||
770 | * windows or posix style path names | ||
771 | */ | ||
772 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS) { | ||
773 | int i; | ||
774 | for (i = 0; i < dfsplen; i++) { | ||
775 | if (full_path[i] == '\\') | ||
776 | full_path[i] = '/'; | ||
777 | } | ||
778 | } | ||
779 | } | ||
780 | strncpy(full_path + dfsplen, vol->prepath, pplen); | 769 | strncpy(full_path + dfsplen, vol->prepath, pplen); |
770 | convert_delimiter(full_path, CIFS_DIR_SEP(cifs_sb)); | ||
781 | full_path[dfsplen + pplen] = 0; /* add trailing null */ | 771 | full_path[dfsplen + pplen] = 0; /* add trailing null */ |
782 | return full_path; | 772 | return full_path; |
783 | } | 773 | } |