From ce558b0e17f8a6d4a57d264479d782c331266f0d Mon Sep 17 00:00:00 2001 From: Steve French Date: Thu, 31 May 2018 19:16:54 -0500 Subject: smb3: Add posix create context for smb3.11 posix mounts Signed-off-by: Steve French --- fs/cifs/smb2misc.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'fs/cifs/smb2misc.c') diff --git a/fs/cifs/smb2misc.c b/fs/cifs/smb2misc.c index 8cee72eebc39..8e45e28ce3ac 100644 --- a/fs/cifs/smb2misc.c +++ b/fs/cifs/smb2misc.c @@ -455,8 +455,14 @@ cifs_convert_path_to_utf16(const char *from, struct cifs_sb_info *cifs_sb) /* Windows doesn't allow paths beginning with \ */ if (from[0] == '\\') start_of_path = from + 1; +#ifdef CONFIG_CIFS_SMB311 + /* SMB311 POSIX extensions paths do not include leading slash */ + else if (cifs_sb_master_tcon(cifs_sb)->posix_extensions) + start_of_path = from + 1; +#endif /* 311 */ else start_of_path = from; + to = cifs_strndup_to_utf16(start_of_path, PATH_MAX, &len, cifs_sb->local_nls, map_type); return to; -- cgit v1.2.3