diff options
author | Steve French <sfrench@us.ibm.com> | 2007-08-30 18:09:15 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2007-08-30 18:09:15 -0400 |
commit | 26f57364d7cdef9d7ebe27c931fff5e4f21ffb1c (patch) | |
tree | 28f991e3ea9e87244312015398f5f25d2eee4405 /fs/cifs/cifssmb.c | |
parent | f01d5e14e764b14b6bf5512678523d009254b209 (diff) |
[CIFS] formatting cleanup found by checkpatch
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/cifssmb.c')
-rw-r--r-- | fs/cifs/cifssmb.c | 44 |
1 files changed, 20 insertions, 24 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index 4795143ff521..bb30455caabc 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c | |||
@@ -94,9 +94,8 @@ static void mark_open_files_invalid(struct cifsTconInfo *pTcon) | |||
94 | write_lock(&GlobalSMBSeslock); | 94 | write_lock(&GlobalSMBSeslock); |
95 | list_for_each_safe(tmp, tmp1, &pTcon->openFileList) { | 95 | list_for_each_safe(tmp, tmp1, &pTcon->openFileList) { |
96 | open_file = list_entry(tmp, struct cifsFileInfo, tlist); | 96 | open_file = list_entry(tmp, struct cifsFileInfo, tlist); |
97 | if (open_file) { | 97 | if (open_file) |
98 | open_file->invalidHandle = TRUE; | 98 | open_file->invalidHandle = TRUE; |
99 | } | ||
100 | } | 99 | } |
101 | write_unlock(&GlobalSMBSeslock); | 100 | write_unlock(&GlobalSMBSeslock); |
102 | /* BB Add call to invalidate_inodes(sb) for all superblocks mounted | 101 | /* BB Add call to invalidate_inodes(sb) for all superblocks mounted |
@@ -1112,7 +1111,7 @@ PsxCreat: | |||
1112 | } | 1111 | } |
1113 | memcpy((char *) pRetData, | 1112 | memcpy((char *) pRetData, |
1114 | (char *)psx_rsp + sizeof(OPEN_PSX_RSP), | 1113 | (char *)psx_rsp + sizeof(OPEN_PSX_RSP), |
1115 | sizeof (FILE_UNIX_BASIC_INFO)); | 1114 | sizeof(FILE_UNIX_BASIC_INFO)); |
1116 | } | 1115 | } |
1117 | 1116 | ||
1118 | psx_create_err: | 1117 | psx_create_err: |
@@ -1193,9 +1192,9 @@ OldOpenRetry: | |||
1193 | } | 1192 | } |
1194 | if (*pOplock & REQ_OPLOCK) | 1193 | if (*pOplock & REQ_OPLOCK) |
1195 | pSMB->OpenFlags = cpu_to_le16(REQ_OPLOCK); | 1194 | pSMB->OpenFlags = cpu_to_le16(REQ_OPLOCK); |
1196 | else if (*pOplock & REQ_BATCHOPLOCK) { | 1195 | else if (*pOplock & REQ_BATCHOPLOCK) |
1197 | pSMB->OpenFlags = cpu_to_le16(REQ_BATCHOPLOCK); | 1196 | pSMB->OpenFlags = cpu_to_le16(REQ_BATCHOPLOCK); |
1198 | } | 1197 | |
1199 | pSMB->OpenFlags |= cpu_to_le16(REQ_MORE_INFO); | 1198 | pSMB->OpenFlags |= cpu_to_le16(REQ_MORE_INFO); |
1200 | /* BB fixme add conversion for access_flags to bits 0 - 2 of mode */ | 1199 | /* BB fixme add conversion for access_flags to bits 0 - 2 of mode */ |
1201 | /* 0 = read | 1200 | /* 0 = read |
@@ -1310,9 +1309,8 @@ openRetry: | |||
1310 | } | 1309 | } |
1311 | if (*pOplock & REQ_OPLOCK) | 1310 | if (*pOplock & REQ_OPLOCK) |
1312 | pSMB->OpenFlags = cpu_to_le32(REQ_OPLOCK); | 1311 | pSMB->OpenFlags = cpu_to_le32(REQ_OPLOCK); |
1313 | else if (*pOplock & REQ_BATCHOPLOCK) { | 1312 | else if (*pOplock & REQ_BATCHOPLOCK) |
1314 | pSMB->OpenFlags = cpu_to_le32(REQ_BATCHOPLOCK); | 1313 | pSMB->OpenFlags = cpu_to_le32(REQ_BATCHOPLOCK); |
1315 | } | ||
1316 | pSMB->DesiredAccess = cpu_to_le32(access_flags); | 1314 | pSMB->DesiredAccess = cpu_to_le32(access_flags); |
1317 | pSMB->AllocationSize = 0; | 1315 | pSMB->AllocationSize = 0; |
1318 | /* set file as system file if special file such | 1316 | /* set file as system file if special file such |
@@ -1446,11 +1444,11 @@ CIFSSMBRead(const int xid, struct cifsTconInfo *tcon, const int netfid, | |||
1446 | *nbytes = 0; | 1444 | *nbytes = 0; |
1447 | } else { | 1445 | } else { |
1448 | pReadData = (char *) (&pSMBr->hdr.Protocol) + | 1446 | pReadData = (char *) (&pSMBr->hdr.Protocol) + |
1449 | le16_to_cpu(pSMBr->DataOffset); | 1447 | le16_to_cpu(pSMBr->DataOffset); |
1450 | /* if (rc = copy_to_user(buf, pReadData, data_length)) { | 1448 | /* if (rc = copy_to_user(buf, pReadData, data_length)) { |
1451 | cERROR(1,("Faulting on read rc = %d",rc)); | 1449 | cERROR(1,("Faulting on read rc = %d",rc)); |
1452 | rc = -EFAULT; | 1450 | rc = -EFAULT; |
1453 | }*/ /* can not use copy_to_user when using page cache*/ | 1451 | }*/ /* can not use copy_to_user when using page cache*/ |
1454 | if (*buf) | 1452 | if (*buf) |
1455 | memcpy(*buf, pReadData, data_length); | 1453 | memcpy(*buf, pReadData, data_length); |
1456 | } | 1454 | } |
@@ -2538,7 +2536,7 @@ validate_ntransact(char *buf, char **ppparm, char **ppdata, | |||
2538 | cFYI(1, ("data starts after end of smb")); | 2536 | cFYI(1, ("data starts after end of smb")); |
2539 | return -EINVAL; | 2537 | return -EINVAL; |
2540 | } else if (data_count + *ppdata > end_of_smb) { | 2538 | } else if (data_count + *ppdata > end_of_smb) { |
2541 | cFYI(1,("data %p + count %d (%p) ends after end of smb %p start %p", | 2539 | cFYI(1, ("data %p + count %d (%p) ends after end of smb %p start %p", |
2542 | *ppdata, data_count, (data_count + *ppdata), | 2540 | *ppdata, data_count, (data_count + *ppdata), |
2543 | end_of_smb, pSMBr)); | 2541 | end_of_smb, pSMBr)); |
2544 | return -EINVAL; | 2542 | return -EINVAL; |
@@ -2615,7 +2613,7 @@ CIFSSMBQueryReparseLinkInfo(const int xid, struct cifsTconInfo *tcon, | |||
2615 | reparse_buf->TargetNameOffset + | 2613 | reparse_buf->TargetNameOffset + |
2616 | reparse_buf->TargetNameLen) > | 2614 | reparse_buf->TargetNameLen) > |
2617 | end_of_smb) { | 2615 | end_of_smb) { |
2618 | cFYI(1,("reparse buf goes beyond SMB")); | 2616 | cFYI(1, ("reparse buf beyond SMB")); |
2619 | rc = -EIO; | 2617 | rc = -EIO; |
2620 | goto qreparse_out; | 2618 | goto qreparse_out; |
2621 | } | 2619 | } |
@@ -3883,12 +3881,10 @@ getDFSRetry: | |||
3883 | pSMB->hdr.Mid = GetNextMid(ses->server); | 3881 | pSMB->hdr.Mid = GetNextMid(ses->server); |
3884 | pSMB->hdr.Tid = ses->ipc_tid; | 3882 | pSMB->hdr.Tid = ses->ipc_tid; |
3885 | pSMB->hdr.Uid = ses->Suid; | 3883 | pSMB->hdr.Uid = ses->Suid; |
3886 | if (ses->capabilities & CAP_STATUS32) { | 3884 | if (ses->capabilities & CAP_STATUS32) |
3887 | pSMB->hdr.Flags2 |= SMBFLG2_ERR_STATUS; | 3885 | pSMB->hdr.Flags2 |= SMBFLG2_ERR_STATUS; |
3888 | } | 3886 | if (ses->capabilities & CAP_DFS) |
3889 | if (ses->capabilities & CAP_DFS) { | ||
3890 | pSMB->hdr.Flags2 |= SMBFLG2_DFS; | 3887 | pSMB->hdr.Flags2 |= SMBFLG2_DFS; |
3891 | } | ||
3892 | 3888 | ||
3893 | if (ses->capabilities & CAP_UNICODE) { | 3889 | if (ses->capabilities & CAP_UNICODE) { |
3894 | pSMB->hdr.Flags2 |= SMBFLG2_UNICODE; | 3890 | pSMB->hdr.Flags2 |= SMBFLG2_UNICODE; |
@@ -4265,7 +4261,7 @@ QFSAttributeRetry: | |||
4265 | *) (((char *) &pSMBr->hdr.Protocol) + | 4261 | *) (((char *) &pSMBr->hdr.Protocol) + |
4266 | data_offset); | 4262 | data_offset); |
4267 | memcpy(&tcon->fsAttrInfo, response_data, | 4263 | memcpy(&tcon->fsAttrInfo, response_data, |
4268 | sizeof (FILE_SYSTEM_ATTRIBUTE_INFO)); | 4264 | sizeof(FILE_SYSTEM_ATTRIBUTE_INFO)); |
4269 | } | 4265 | } |
4270 | } | 4266 | } |
4271 | cifs_buf_release(pSMB); | 4267 | cifs_buf_release(pSMB); |
@@ -4334,7 +4330,7 @@ QFSDeviceRetry: | |||
4334 | (((char *) &pSMBr->hdr.Protocol) + | 4330 | (((char *) &pSMBr->hdr.Protocol) + |
4335 | data_offset); | 4331 | data_offset); |
4336 | memcpy(&tcon->fsDevInfo, response_data, | 4332 | memcpy(&tcon->fsDevInfo, response_data, |
4337 | sizeof (FILE_SYSTEM_DEVICE_INFO)); | 4333 | sizeof(FILE_SYSTEM_DEVICE_INFO)); |
4338 | } | 4334 | } |
4339 | } | 4335 | } |
4340 | cifs_buf_release(pSMB); | 4336 | cifs_buf_release(pSMB); |
@@ -4402,7 +4398,7 @@ QFSUnixRetry: | |||
4402 | *) (((char *) &pSMBr->hdr.Protocol) + | 4398 | *) (((char *) &pSMBr->hdr.Protocol) + |
4403 | data_offset); | 4399 | data_offset); |
4404 | memcpy(&tcon->fsUnixInfo, response_data, | 4400 | memcpy(&tcon->fsUnixInfo, response_data, |
4405 | sizeof (FILE_SYSTEM_UNIX_INFO)); | 4401 | sizeof(FILE_SYSTEM_UNIX_INFO)); |
4406 | } | 4402 | } |
4407 | } | 4403 | } |
4408 | cifs_buf_release(pSMB); | 4404 | cifs_buf_release(pSMB); |
@@ -4612,7 +4608,7 @@ SetEOFRetry: | |||
4612 | strncpy(pSMB->FileName, fileName, name_len); | 4608 | strncpy(pSMB->FileName, fileName, name_len); |
4613 | } | 4609 | } |
4614 | params = 6 + name_len; | 4610 | params = 6 + name_len; |
4615 | data_count = sizeof (struct file_end_of_file_info); | 4611 | data_count = sizeof(struct file_end_of_file_info); |
4616 | pSMB->MaxParameterCount = cpu_to_le16(2); | 4612 | pSMB->MaxParameterCount = cpu_to_le16(2); |
4617 | pSMB->MaxDataCount = cpu_to_le16(4100); | 4613 | pSMB->MaxDataCount = cpu_to_le16(4100); |
4618 | pSMB->MaxSetupCount = 0; | 4614 | pSMB->MaxSetupCount = 0; |
@@ -4800,7 +4796,7 @@ CIFSSMBSetFileTimes(const int xid, struct cifsTconInfo *tcon, | |||
4800 | 4796 | ||
4801 | data_offset = (char *) (&pSMB->hdr.Protocol) + offset; | 4797 | data_offset = (char *) (&pSMB->hdr.Protocol) + offset; |
4802 | 4798 | ||
4803 | count = sizeof (FILE_BASIC_INFO); | 4799 | count = sizeof(FILE_BASIC_INFO); |
4804 | pSMB->MaxParameterCount = cpu_to_le16(2); | 4800 | pSMB->MaxParameterCount = cpu_to_le16(2); |
4805 | pSMB->MaxDataCount = cpu_to_le16(1000); /* BB find max SMB PDU from sess */ | 4801 | pSMB->MaxDataCount = cpu_to_le16(1000); /* BB find max SMB PDU from sess */ |
4806 | pSMB->SetupCount = 1; | 4802 | pSMB->SetupCount = 1; |
@@ -4871,7 +4867,7 @@ SetTimesRetry: | |||
4871 | } | 4867 | } |
4872 | 4868 | ||
4873 | params = 6 + name_len; | 4869 | params = 6 + name_len; |
4874 | count = sizeof (FILE_BASIC_INFO); | 4870 | count = sizeof(FILE_BASIC_INFO); |
4875 | pSMB->MaxParameterCount = cpu_to_le16(2); | 4871 | pSMB->MaxParameterCount = cpu_to_le16(2); |
4876 | pSMB->MaxDataCount = cpu_to_le16(1000); /* BB find exact max SMB PDU from sess structure BB */ | 4872 | pSMB->MaxDataCount = cpu_to_le16(1000); /* BB find exact max SMB PDU from sess structure BB */ |
4877 | pSMB->MaxSetupCount = 0; | 4873 | pSMB->MaxSetupCount = 0; |
@@ -4900,7 +4896,7 @@ SetTimesRetry: | |||
4900 | pSMB->InformationLevel = cpu_to_le16(SMB_SET_FILE_BASIC_INFO); | 4896 | pSMB->InformationLevel = cpu_to_le16(SMB_SET_FILE_BASIC_INFO); |
4901 | pSMB->Reserved4 = 0; | 4897 | pSMB->Reserved4 = 0; |
4902 | pSMB->hdr.smb_buf_length += byte_count; | 4898 | pSMB->hdr.smb_buf_length += byte_count; |
4903 | memcpy(data_offset, data, sizeof (FILE_BASIC_INFO)); | 4899 | memcpy(data_offset, data, sizeof(FILE_BASIC_INFO)); |
4904 | pSMB->ByteCount = cpu_to_le16(byte_count); | 4900 | pSMB->ByteCount = cpu_to_le16(byte_count); |
4905 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, | 4901 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, |
4906 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); | 4902 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); |
@@ -5003,7 +4999,7 @@ setPermsRetry: | |||
5003 | } | 4999 | } |
5004 | 5000 | ||
5005 | params = 6 + name_len; | 5001 | params = 6 + name_len; |
5006 | count = sizeof (FILE_UNIX_BASIC_INFO); | 5002 | count = sizeof(FILE_UNIX_BASIC_INFO); |
5007 | pSMB->MaxParameterCount = cpu_to_le16(2); | 5003 | pSMB->MaxParameterCount = cpu_to_le16(2); |
5008 | pSMB->MaxDataCount = cpu_to_le16(1000); /* BB find exact max SMB PDU from sess structure BB */ | 5004 | pSMB->MaxDataCount = cpu_to_le16(1000); /* BB find exact max SMB PDU from sess structure BB */ |
5009 | pSMB->MaxSetupCount = 0; | 5005 | pSMB->MaxSetupCount = 0; |