aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifssmb.c
diff options
context:
space:
mode:
authorPavel Shilovsky <piastry@etersoft.ru>2012-03-17 04:41:12 -0400
committerSteve French <smfrench@gmail.com>2012-07-27 16:17:40 -0400
commitf436720e94ac53413e20c48b02d16e2ef180e166 (patch)
treefa831b67f689a847fcdb0942ad624c6d060594de /fs/cifs/cifssmb.c
parentff691e969433a54e26fb6502a6613e02c680e8ee (diff)
CIFS: Separate protocol specific part from mkdir
Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru> Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/cifssmb.c')
-rw-r--r--fs/cifs/cifssmb.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 01808eb3af47..eb74cceef480 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -992,14 +992,15 @@ RmDirRetry:
992} 992}
993 993
994int 994int
995CIFSSMBMkDir(const unsigned int xid, struct cifs_tcon *tcon, 995CIFSSMBMkDir(const unsigned int xid, struct cifs_tcon *tcon, const char *name,
996 const char *name, const struct nls_table *nls_codepage, int remap) 996 struct cifs_sb_info *cifs_sb)
997{ 997{
998 int rc = 0; 998 int rc = 0;
999 CREATE_DIRECTORY_REQ *pSMB = NULL; 999 CREATE_DIRECTORY_REQ *pSMB = NULL;
1000 CREATE_DIRECTORY_RSP *pSMBr = NULL; 1000 CREATE_DIRECTORY_RSP *pSMBr = NULL;
1001 int bytes_returned; 1001 int bytes_returned;
1002 int name_len; 1002 int name_len;
1003 int remap = cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR;
1003 1004
1004 cFYI(1, "In CIFSSMBMkDir"); 1005 cFYI(1, "In CIFSSMBMkDir");
1005MkDirRetry: 1006MkDirRetry:
@@ -1010,7 +1011,8 @@ MkDirRetry:
1010 1011
1011 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 1012 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) {
1012 name_len = cifsConvertToUTF16((__le16 *) pSMB->DirName, name, 1013 name_len = cifsConvertToUTF16((__le16 *) pSMB->DirName, name,
1013 PATH_MAX, nls_codepage, remap); 1014 PATH_MAX, cifs_sb->local_nls,
1015 remap);
1014 name_len++; /* trailing null */ 1016 name_len++; /* trailing null */
1015 name_len *= 2; 1017 name_len *= 2;
1016 } else { /* BB improve check for buffer overruns BB */ 1018 } else { /* BB improve check for buffer overruns BB */