diff options
author | Steve French <stfrench@microsoft.com> | 2018-05-31 19:16:54 -0500 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2018-05-31 21:23:07 -0500 |
commit | ce558b0e17f8a6d4a57d264479d782c331266f0d (patch) | |
tree | 09c1e0b3e7a78cea4153d25f54389c300f25db59 /fs/cifs/smb2misc.c | |
parent | 28d59363ae746d01e7841479da718631f941353d (diff) | |
download | lwn-ce558b0e17f8a6d4a57d264479d782c331266f0d.tar.gz lwn-ce558b0e17f8a6d4a57d264479d782c331266f0d.zip |
smb3: Add posix create context for smb3.11 posix mounts
Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/smb2misc.c')
-rw-r--r-- | fs/cifs/smb2misc.c | 6 |
1 files changed, 6 insertions, 0 deletions
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; |