summaryrefslogtreecommitdiffstats
path: root/fs/cifs/smb2misc.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-10-18 22:39:19 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2014-10-18 22:39:19 +0200
commit9272f2dc3956c6b6c4335de51bc897fa3b981584 (patch)
tree0fed79884531f07bbc3abeca876d3a8b60f653b3 /fs/cifs/smb2misc.c
parentMerge tag 'dlm-3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/teiglan... (diff)
parent[CIFS] Remove obsolete comment (diff)
downloadlinux-9272f2dc3956c6b6c4335de51bc897fa3b981584.tar.xz
linux-9272f2dc3956c6b6c4335de51bc897fa3b981584.zip
Merge branch 'for-linus' of git://git.samba.org/sfrench/cifs-2.6
Pull cifs/smb3 updates from Steve French: "Improved SMB3 support (symlink and device emulation, and remapping by default the 7 reserved posix characters) and a workaround for cifs mounts to Mac (working around a commonly encountered Mac server bug)" * 'for-linus' of git://git.samba.org/sfrench/cifs-2.6: [CIFS] Remove obsolete comment Check minimum response length on query_network_interface Workaround Mac server problem Remap reserved posix characters by default (part 3/3) Allow conversion of characters in Mac remap range (part 2) Allow conversion of characters in Mac remap range. Part 1 mfsymlinks support for SMB2.1/SMB3. Part 2 query symlink Add mfsymlinks support for SMB2.1/SMB3. Part 1 create symlink Allow mknod and mkfifo on SMB2/SMB3 mounts add defines for two new file attributes
Diffstat (limited to 'fs/cifs/smb2misc.c')
-rw-r--r--fs/cifs/smb2misc.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/fs/cifs/smb2misc.c b/fs/cifs/smb2misc.c
index 4aa7a0f07d6e..1a08a34838fc 100644
--- a/fs/cifs/smb2misc.c
+++ b/fs/cifs/smb2misc.c
@@ -379,6 +379,14 @@ cifs_convert_path_to_utf16(const char *from, struct cifs_sb_info *cifs_sb)
int len;
const char *start_of_path;
__le16 *to;
+ int map_type;
+
+ if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SFM_CHR)
+ map_type = SFM_MAP_UNI_RSVD;
+ else if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR)
+ map_type = SFU_MAP_UNI_RSVD;
+ else
+ map_type = NO_MAP_UNI_RSVD;
/* Windows doesn't allow paths beginning with \ */
if (from[0] == '\\')
@@ -386,9 +394,7 @@ cifs_convert_path_to_utf16(const char *from, struct cifs_sb_info *cifs_sb)
else
start_of_path = from;
to = cifs_strndup_to_utf16(start_of_path, PATH_MAX, &len,
- cifs_sb->local_nls,
- cifs_sb->mnt_cifs_flags &
- CIFS_MOUNT_MAP_SPECIAL_CHR);
+ cifs_sb->local_nls, map_type);
return to;
}