aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifssmb.c
diff options
context:
space:
mode:
authorCyril Gorcunov <gorcunov@gmail.com>2007-10-14 13:58:43 -0400
committerSteve French <sfrench@us.ibm.com>2007-10-14 13:58:43 -0400
commit8f2376adfb57d95973b64ecdf016937f436b9bf0 (patch)
tree830a7f20af90be883a684fddc71a18f7c11df2b6 /fs/cifs/cifssmb.c
parent516897a208bc1423d561ce2ccce0624c3b652275 (diff)
[CIFS] Fix endian conversion problem in posix mkdir
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/cifssmb.c')
-rw-r--r--fs/cifs/cifssmb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index eff3226b2104..b17983633a1c 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -1069,7 +1069,7 @@ PsxCreat:
1069 InformationLevel) - 4; 1069 InformationLevel) - 4;
1070 offset = param_offset + params; 1070 offset = param_offset + params;
1071 pdata = (OPEN_PSX_REQ *)(((char *)&pSMB->hdr.Protocol) + offset); 1071 pdata = (OPEN_PSX_REQ *)(((char *)&pSMB->hdr.Protocol) + offset);
1072 pdata->Level = SMB_QUERY_FILE_UNIX_BASIC; 1072 pdata->Level = cpu_to_le16(SMB_QUERY_FILE_UNIX_BASIC);
1073 pdata->Permissions = cpu_to_le64(mode); 1073 pdata->Permissions = cpu_to_le64(mode);
1074 pdata->PosixOpenFlags = cpu_to_le32(posix_flags); 1074 pdata->PosixOpenFlags = cpu_to_le32(posix_flags);
1075 pdata->OpenFlags = cpu_to_le32(*pOplock); 1075 pdata->OpenFlags = cpu_to_le32(*pOplock);
@@ -1115,8 +1115,8 @@ PsxCreat:
1115 if (cpu_to_le32(FILE_CREATE) == psx_rsp->CreateAction) 1115 if (cpu_to_le32(FILE_CREATE) == psx_rsp->CreateAction)
1116 *pOplock |= CIFS_CREATE_ACTION; 1116 *pOplock |= CIFS_CREATE_ACTION;
1117 /* check to make sure response data is there */ 1117 /* check to make sure response data is there */
1118 if (psx_rsp->ReturnedLevel != SMB_QUERY_FILE_UNIX_BASIC) { 1118 if (psx_rsp->ReturnedLevel != cpu_to_le16(SMB_QUERY_FILE_UNIX_BASIC)) {
1119 pRetData->Type = -1; /* unknown */ 1119 pRetData->Type = cpu_to_le32(-1); /* unknown */
1120#ifdef CONFIG_CIFS_DEBUG2 1120#ifdef CONFIG_CIFS_DEBUG2
1121 cFYI(1, ("unknown type")); 1121 cFYI(1, ("unknown type"));
1122#endif 1122#endif
@@ -1124,7 +1124,7 @@ PsxCreat:
1124 if (pSMBr->ByteCount < sizeof(OPEN_PSX_RSP) 1124 if (pSMBr->ByteCount < sizeof(OPEN_PSX_RSP)
1125 + sizeof(FILE_UNIX_BASIC_INFO)) { 1125 + sizeof(FILE_UNIX_BASIC_INFO)) {
1126 cERROR(1, ("Open response data too small")); 1126 cERROR(1, ("Open response data too small"));
1127 pRetData->Type = -1; 1127 pRetData->Type = cpu_to_le32(-1);
1128 goto psx_create_err; 1128 goto psx_create_err;
1129 } 1129 }
1130 memcpy((char *) pRetData, 1130 memcpy((char *) pRetData,