summaryrefslogtreecommitdiff
path: root/fs/cifs/cifssmb.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2007-04-25 11:46:06 +0000
committerSteve French <sfrench@us.ibm.com>2007-04-25 11:46:06 +0000
commitcbac3cba66ab51492da53e7bf4f38da872408065 (patch)
tree4f6531413c4063a879b96fb4e89805f5ac982773 /fs/cifs/cifssmb.c
parent2dd29d3133ad4c7926ea03b8431e604373c4ad65 (diff)
downloadkernel-common-cbac3cba66ab51492da53e7bf4f38da872408065.tar.gz
kernel-common-cbac3cba66ab51492da53e7bf4f38da872408065.tar.bz2
kernel-common-cbac3cba66ab51492da53e7bf4f38da872408065.zip
[CIFS] New CIFS POSIX mkdir performance improvement (part 2)
Fix incorrect parsing of return data Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/cifssmb.c')
-rw-r--r--fs/cifs/cifssmb.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index a7d3d8e5c6c5..14de58fa1437 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -1008,9 +1008,12 @@ PsxCreat:
if(cpu_to_le32(FILE_CREATE) == psx_rsp->CreateAction)
*pOplock |= CIFS_CREATE_ACTION;
/* check to make sure response data is there */
- if(psx_rsp->ReturnedLevel != SMB_QUERY_FILE_UNIX_BASIC)
- pRetData->Type = -1; /* unknown */
- else {
+ if(psx_rsp->ReturnedLevel != SMB_QUERY_FILE_UNIX_BASIC) {
+ pRetData->Type = -1; /* unknown */
+#ifdef CONFIG_CIFS_DEBUG2
+ cFYI(1,("unknown type"));
+#endif
+ } else {
if(pSMBr->ByteCount < sizeof(OPEN_PSX_RSP)
+ sizeof(FILE_UNIX_BASIC_INFO)) {
cERROR(1,("Open response data too small"));
@@ -1018,7 +1021,7 @@ PsxCreat:
goto psx_create_err;
}
memcpy((char *) pRetData,
- (char *)&psx_rsp + sizeof(OPEN_PSX_RSP),
+ (char *)psx_rsp + sizeof(OPEN_PSX_RSP),
sizeof (FILE_UNIX_BASIC_INFO));
}