diff options
author | Steve French <sfrench@us.ibm.com> | 2007-07-17 13:34:02 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2007-07-17 13:34:02 -0400 |
commit | 63135e088a604b955746c51964c195c8d3ebac11 (patch) | |
tree | 506ec95bfeb29c3bacf2cc561045e8bb2f92d31e /fs | |
parent | 7e42ca886b0282679c2721dc4853163cc89b8a34 (diff) |
[CIFS] More whitespace/formatting fixes (noticed by checkpatch)
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/cifs/cifsencrypt.c | 3 | ||||
-rw-r--r-- | fs/cifs/cifsfs.c | 20 | ||||
-rw-r--r-- | fs/cifs/cifssmb.c | 33 | ||||
-rw-r--r-- | fs/cifs/connect.c | 43 | ||||
-rw-r--r-- | fs/cifs/file.c | 5 | ||||
-rw-r--r-- | fs/cifs/link.c | 3 | ||||
-rw-r--r-- | fs/cifs/misc.c | 15 | ||||
-rw-r--r-- | fs/cifs/netmisc.c | 6 | ||||
-rw-r--r-- | fs/cifs/sess.c | 3 | ||||
-rw-r--r-- | fs/cifs/xattr.c | 3 |
10 files changed, 88 insertions, 46 deletions
diff --git a/fs/cifs/cifsencrypt.c b/fs/cifs/cifsencrypt.c index be012a17278a..36272293027d 100644 --- a/fs/cifs/cifsencrypt.c +++ b/fs/cifs/cifsencrypt.c | |||
@@ -109,7 +109,8 @@ static int cifs_calc_signature2(const struct kvec *iov, int n_vec, | |||
109 | if (i == 0) { | 109 | if (i == 0) { |
110 | if (iov[0].iov_len <= 8 ) /* cmd field at offset 9 */ | 110 | if (iov[0].iov_len <= 8 ) /* cmd field at offset 9 */ |
111 | break; /* nothing to sign or corrupt header */ | 111 | break; /* nothing to sign or corrupt header */ |
112 | MD5Update(&context,iov[0].iov_base+4, iov[0].iov_len-4); | 112 | MD5Update(&context, iov[0].iov_base+4, |
113 | iov[0].iov_len-4); | ||
113 | } else | 114 | } else |
114 | MD5Update(&context, iov[i].iov_base, iov[i].iov_len); | 115 | MD5Update(&context, iov[i].iov_base, iov[i].iov_len); |
115 | } | 116 | } |
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index 8ebd887205bb..a0a2f3186557 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
@@ -71,16 +71,20 @@ static struct task_struct *dnotifyThread = NULL; | |||
71 | static const struct super_operations cifs_super_ops; | 71 | static const struct super_operations cifs_super_ops; |
72 | unsigned int CIFSMaxBufSize = CIFS_MAX_MSGSIZE; | 72 | unsigned int CIFSMaxBufSize = CIFS_MAX_MSGSIZE; |
73 | module_param(CIFSMaxBufSize, int, 0); | 73 | module_param(CIFSMaxBufSize, int, 0); |
74 | MODULE_PARM_DESC(CIFSMaxBufSize,"Network buffer size (not including header). Default: 16384 Range: 8192 to 130048"); | 74 | MODULE_PARM_DESC(CIFSMaxBufSize, "Network buffer size (not including header). " |
75 | "Default: 16384 Range: 8192 to 130048"); | ||
75 | unsigned int cifs_min_rcv = CIFS_MIN_RCV_POOL; | 76 | unsigned int cifs_min_rcv = CIFS_MIN_RCV_POOL; |
76 | module_param(cifs_min_rcv, int, 0); | 77 | module_param(cifs_min_rcv, int, 0); |
77 | MODULE_PARM_DESC(cifs_min_rcv,"Network buffers in pool. Default: 4 Range: 1 to 64"); | 78 | MODULE_PARM_DESC(cifs_min_rcv, "Network buffers in pool. Default: 4 Range: " |
79 | "1 to 64"); | ||
78 | unsigned int cifs_min_small = 30; | 80 | unsigned int cifs_min_small = 30; |
79 | module_param(cifs_min_small, int, 0); | 81 | module_param(cifs_min_small, int, 0); |
80 | MODULE_PARM_DESC(cifs_min_small,"Small network buffers in pool. Default: 30 Range: 2 to 256"); | 82 | MODULE_PARM_DESC(cifs_min_small, "Small network buffers in pool. Default: 30 " |
83 | "Range: 2 to 256"); | ||
81 | unsigned int cifs_max_pending = CIFS_MAX_REQ; | 84 | unsigned int cifs_max_pending = CIFS_MAX_REQ; |
82 | module_param(cifs_max_pending, int, 0); | 85 | module_param(cifs_max_pending, int, 0); |
83 | MODULE_PARM_DESC(cifs_max_pending,"Simultaneous requests to server. Default: 50 Range: 2 to 256"); | 86 | MODULE_PARM_DESC(cifs_max_pending, "Simultaneous requests to server. " |
87 | "Default: 50 Range: 2 to 256"); | ||
84 | 88 | ||
85 | extern mempool_t *cifs_sm_req_poolp; | 89 | extern mempool_t *cifs_sm_req_poolp; |
86 | extern mempool_t *cifs_req_poolp; | 90 | extern mempool_t *cifs_req_poolp; |
@@ -902,7 +906,8 @@ static int cifs_oplock_thread(void *dummyarg) | |||
902 | 0 /* len */ , 0 /* offset */, 0, | 906 | 0 /* len */ , 0 /* offset */, 0, |
903 | 0, LOCKING_ANDX_OPLOCK_RELEASE, | 907 | 0, LOCKING_ANDX_OPLOCK_RELEASE, |
904 | 0 /* wait flag */); | 908 | 0 /* wait flag */); |
905 | cFYI(1,("Oplock release rc = %d ", rc)); | 909 | cFYI(1, |
910 | ("Oplock release rc = %d ", rc)); | ||
906 | } | 911 | } |
907 | } else | 912 | } else |
908 | spin_unlock(&GlobalMid_Lock); | 913 | spin_unlock(&GlobalMid_Lock); |
@@ -1040,7 +1045,7 @@ init_cifs(void) | |||
1040 | static void __exit | 1045 | static void __exit |
1041 | exit_cifs(void) | 1046 | exit_cifs(void) |
1042 | { | 1047 | { |
1043 | cFYI(0, ("In unregister ie exit_cifs")); | 1048 | cFYI(0, ("exit_cifs")); |
1044 | #ifdef CONFIG_PROC_FS | 1049 | #ifdef CONFIG_PROC_FS |
1045 | cifs_proc_clean(); | 1050 | cifs_proc_clean(); |
1046 | #endif | 1051 | #endif |
@@ -1055,7 +1060,8 @@ exit_cifs(void) | |||
1055 | MODULE_AUTHOR("Steve French <sfrench@us.ibm.com>"); | 1060 | MODULE_AUTHOR("Steve French <sfrench@us.ibm.com>"); |
1056 | MODULE_LICENSE("GPL"); /* combination of LGPL + GPL source behaves as GPL */ | 1061 | MODULE_LICENSE("GPL"); /* combination of LGPL + GPL source behaves as GPL */ |
1057 | MODULE_DESCRIPTION | 1062 | MODULE_DESCRIPTION |
1058 | ("VFS to access servers complying with the SNIA CIFS Specification e.g. Samba and Windows"); | 1063 | ("VFS to access servers complying with the SNIA CIFS Specification " |
1064 | "e.g. Samba and Windows"); | ||
1059 | MODULE_VERSION(CIFS_VERSION); | 1065 | MODULE_VERSION(CIFS_VERSION); |
1060 | module_init(init_cifs) | 1066 | module_init(init_cifs) |
1061 | module_exit(exit_cifs) | 1067 | module_exit(exit_cifs) |
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index b339f5f128da..a6ff406ac6b4 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c | |||
@@ -132,10 +132,13 @@ small_smb_init(int smb_command, int wct, struct cifsTconInfo *tcon, | |||
132 | /* Give Demultiplex thread up to 10 seconds to | 132 | /* Give Demultiplex thread up to 10 seconds to |
133 | reconnect, should be greater than cifs socket | 133 | reconnect, should be greater than cifs socket |
134 | timeout which is 7 seconds */ | 134 | timeout which is 7 seconds */ |
135 | while(tcon->ses->server->tcpStatus == CifsNeedReconnect) { | 135 | while(tcon->ses->server->tcpStatus == |
136 | CifsNeedReconnect) { | ||
136 | wait_event_interruptible_timeout(tcon->ses->server->response_q, | 137 | wait_event_interruptible_timeout(tcon->ses->server->response_q, |
137 | (tcon->ses->server->tcpStatus == CifsGood), 10 * HZ); | 138 | (tcon->ses->server->tcpStatus == |
138 | if (tcon->ses->server->tcpStatus == CifsNeedReconnect) { | 139 | CifsGood), 10 * HZ); |
140 | if (tcon->ses->server->tcpStatus == | ||
141 | CifsNeedReconnect) { | ||
139 | /* on "soft" mounts we wait once */ | 142 | /* on "soft" mounts we wait once */ |
140 | if ((tcon->retry == FALSE) || | 143 | if ((tcon->retry == FALSE) || |
141 | (tcon->ses->status == CifsExiting)) { | 144 | (tcon->ses->status == CifsExiting)) { |
@@ -209,7 +212,8 @@ small_smb_init(int smb_command, int wct, struct cifsTconInfo *tcon, | |||
209 | return -ENOMEM; | 212 | return -ENOMEM; |
210 | } | 213 | } |
211 | 214 | ||
212 | header_assemble((struct smb_hdr *) *request_buf, smb_command, tcon,wct); | 215 | header_assemble((struct smb_hdr *) *request_buf, smb_command, |
216 | tcon,wct); | ||
213 | 217 | ||
214 | if (tcon != NULL) | 218 | if (tcon != NULL) |
215 | cifs_stats_inc(&tcon->num_smbs_sent); | 219 | cifs_stats_inc(&tcon->num_smbs_sent); |
@@ -274,9 +278,11 @@ smb_init(int smb_command, int wct, struct cifsTconInfo *tcon, | |||
274 | /* Give Demultiplex thread up to 10 seconds to | 278 | /* Give Demultiplex thread up to 10 seconds to |
275 | reconnect, should be greater than cifs socket | 279 | reconnect, should be greater than cifs socket |
276 | timeout which is 7 seconds */ | 280 | timeout which is 7 seconds */ |
277 | while(tcon->ses->server->tcpStatus == CifsNeedReconnect) { | 281 | while (tcon->ses->server->tcpStatus == |
282 | CifsNeedReconnect) { | ||
278 | wait_event_interruptible_timeout(tcon->ses->server->response_q, | 283 | wait_event_interruptible_timeout(tcon->ses->server->response_q, |
279 | (tcon->ses->server->tcpStatus == CifsGood), 10 * HZ); | 284 | (tcon->ses->server->tcpStatus == |
285 | CifsGood), 10 * HZ); | ||
280 | if (tcon->ses->server->tcpStatus == | 286 | if (tcon->ses->server->tcpStatus == |
281 | CifsNeedReconnect) { | 287 | CifsNeedReconnect) { |
282 | /* on "soft" mounts we wait once */ | 288 | /* on "soft" mounts we wait once */ |
@@ -381,7 +387,8 @@ static int validate_t2(struct smb_t2_rsp *pSMB) | |||
381 | /* check that bcc is less than negotiated smb buffer */ | 387 | /* check that bcc is less than negotiated smb buffer */ |
382 | total_size = le16_to_cpu(pSMB->t2_rsp.ParameterCount); | 388 | total_size = le16_to_cpu(pSMB->t2_rsp.ParameterCount); |
383 | if (total_size < 512) { | 389 | if (total_size < 512) { |
384 | total_size+=le16_to_cpu(pSMB->t2_rsp.DataCount); | 390 | total_size += |
391 | le16_to_cpu(pSMB->t2_rsp.DataCount); | ||
385 | /* BCC le converted in SendReceive */ | 392 | /* BCC le converted in SendReceive */ |
386 | pBCC = (pSMB->hdr.WordCount * 2) + | 393 | pBCC = (pSMB->hdr.WordCount * 2) + |
387 | sizeof(struct smb_hdr) + | 394 | sizeof(struct smb_hdr) + |
@@ -2608,7 +2615,7 @@ CIFSSMBQueryReparseLinkInfo(const int xid, struct cifsTconInfo *tcon, | |||
2608 | reparse_buf->TargetNameOffset + | 2615 | reparse_buf->TargetNameOffset + |
2609 | reparse_buf->TargetNameLen) > | 2616 | reparse_buf->TargetNameLen) > |
2610 | end_of_smb) { | 2617 | end_of_smb) { |
2611 | cFYI(1,("reparse buf extended beyond SMB")); | 2618 | cFYI(1,("reparse buf goes beyond SMB")); |
2612 | rc = -EIO; | 2619 | rc = -EIO; |
2613 | goto qreparse_out; | 2620 | goto qreparse_out; |
2614 | } | 2621 | } |
@@ -2632,7 +2639,8 @@ CIFSSMBQueryReparseLinkInfo(const int xid, struct cifsTconInfo *tcon, | |||
2632 | } | 2639 | } |
2633 | } else { | 2640 | } else { |
2634 | rc = -EIO; | 2641 | rc = -EIO; |
2635 | cFYI(1,("Invalid return data count on get reparse info ioctl")); | 2642 | cFYI(1, ("Invalid return data count on " |
2643 | "get reparse info ioctl")); | ||
2636 | } | 2644 | } |
2637 | symlinkinfo[buflen] = 0; /* just in case so the caller | 2645 | symlinkinfo[buflen] = 0; /* just in case so the caller |
2638 | does not go off the end of the buffer */ | 2646 | does not go off the end of the buffer */ |
@@ -2750,7 +2758,8 @@ static __u16 ACL_to_cifs_posix(char *parm_data, const char *pACL, | |||
2750 | return 0; | 2758 | return 0; |
2751 | 2759 | ||
2752 | count = posix_acl_xattr_count((size_t)buflen); | 2760 | count = posix_acl_xattr_count((size_t)buflen); |
2753 | cFYI(1,("setting acl with %d entries from buf of length %d and version of %d", | 2761 | cFYI(1,("setting acl with %d entries from buf of length %d and " |
2762 | "version of %d", | ||
2754 | count, buflen, le32_to_cpu(local_acl->a_version))); | 2763 | count, buflen, le32_to_cpu(local_acl->a_version))); |
2755 | if (le32_to_cpu(local_acl->a_version) != 2) { | 2764 | if (le32_to_cpu(local_acl->a_version) != 2) { |
2756 | cFYI(1, ("unknown POSIX ACL version %d", | 2765 | cFYI(1, ("unknown POSIX ACL version %d", |
@@ -3957,7 +3966,9 @@ getDFSRetry: | |||
3957 | (8 /* sizeof start of data block */ + | 3966 | (8 /* sizeof start of data block */ + |
3958 | data_offset + | 3967 | data_offset + |
3959 | (char *) &pSMBr->hdr.Protocol); | 3968 | (char *) &pSMBr->hdr.Protocol); |
3960 | cFYI(1,("num_referrals: %d dfs flags: 0x%x ... \nfor referral one refer size: 0x%x srv type: 0x%x refer flags: 0x%x ttl: 0x%x", | 3969 | cFYI(1,("num_referrals: %d dfs flags: 0x%x ... \n" |
3970 | "for referral one refer size: 0x%x srv " | ||
3971 | "type: 0x%x refer flags: 0x%x ttl: 0x%x", | ||
3961 | le16_to_cpu(pSMBr->NumberOfReferrals), | 3972 | le16_to_cpu(pSMBr->NumberOfReferrals), |
3962 | le16_to_cpu(pSMBr->DFSFlags), | 3973 | le16_to_cpu(pSMBr->DFSFlags), |
3963 | le16_to_cpu(referrals->ReferralSize), | 3974 | le16_to_cpu(referrals->ReferralSize), |
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 9d6d9a09d973..8b341a8599f8 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -278,7 +278,7 @@ static int coalesce_t2(struct smb_hdr *psecond, struct smb_hdr *pTargetSMB) | |||
278 | total_data_size = le16_to_cpu(pSMBt->t2_rsp.TotalDataCount); | 278 | total_data_size = le16_to_cpu(pSMBt->t2_rsp.TotalDataCount); |
279 | 279 | ||
280 | if (total_data_size != le16_to_cpu(pSMB2->t2_rsp.TotalDataCount)) { | 280 | if (total_data_size != le16_to_cpu(pSMB2->t2_rsp.TotalDataCount)) { |
281 | cFYI(1, ("total data sizes of primary and secondary t2 differ")); | 281 | cFYI(1, ("total data size of primary and secondary t2 differ")); |
282 | } | 282 | } |
283 | 283 | ||
284 | total_in_buf = le16_to_cpu(pSMBt->t2_rsp.DataCount); | 284 | total_in_buf = le16_to_cpu(pSMBt->t2_rsp.DataCount); |
@@ -1036,7 +1036,8 @@ cifs_parse_mount_options(char *options, const char *devname, | |||
1036 | } | 1036 | } |
1037 | } else if (strnicmp(data, "iocharset", 9) == 0) { | 1037 | } else if (strnicmp(data, "iocharset", 9) == 0) { |
1038 | if (!value || !*value) { | 1038 | if (!value || !*value) { |
1039 | printk(KERN_WARNING "CIFS: invalid iocharset specified\n"); | 1039 | printk(KERN_WARNING "CIFS: invalid iocharset " |
1040 | "specified\n"); | ||
1040 | return 1; /* needs_arg; */ | 1041 | return 1; /* needs_arg; */ |
1041 | } | 1042 | } |
1042 | if (strnlen(value, 65) < 65) { | 1043 | if (strnlen(value, 65) < 65) { |
@@ -1046,7 +1047,8 @@ cifs_parse_mount_options(char *options, const char *devname, | |||
1046 | is used by caller */ | 1047 | is used by caller */ |
1047 | cFYI(1, ("iocharset set to %s", value)); | 1048 | cFYI(1, ("iocharset set to %s", value)); |
1048 | } else { | 1049 | } else { |
1049 | printk(KERN_WARNING "CIFS: iocharset name too long.\n"); | 1050 | printk(KERN_WARNING "CIFS: iocharset name " |
1051 | "too long.\n"); | ||
1050 | return 1; | 1052 | return 1; |
1051 | } | 1053 | } |
1052 | } else if (strnicmp(data, "uid", 3) == 0) { | 1054 | } else if (strnicmp(data, "uid", 3) == 0) { |
@@ -1098,7 +1100,7 @@ cifs_parse_mount_options(char *options, const char *devname, | |||
1098 | } | 1100 | } |
1099 | } else if (strnicmp(data, "netbiosname", 4) == 0) { | 1101 | } else if (strnicmp(data, "netbiosname", 4) == 0) { |
1100 | if (!value || !*value || (*value == ' ')) { | 1102 | if (!value || !*value || (*value == ' ')) { |
1101 | cFYI(1, ("invalid (empty) netbiosname specified")); | 1103 | cFYI(1, ("invalid (empty) netbiosname")); |
1102 | } else { | 1104 | } else { |
1103 | memset(vol->source_rfc1001_name, 0x20, 15); | 1105 | memset(vol->source_rfc1001_name, 0x20, 15); |
1104 | for (i = 0; i < 15; i++) { | 1106 | for (i = 0; i < 15; i++) { |
@@ -2827,7 +2829,8 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned int xid, | |||
2827 | bcc_ptr++; | 2829 | bcc_ptr++; |
2828 | } else | 2830 | } else |
2829 | cFYI(1, | 2831 | cFYI(1, |
2830 | ("Variable field of length %d extends beyond end of smb", | 2832 | ("field of length %d " |
2833 | "extends beyond end of smb", | ||
2831 | len)); | 2834 | len)); |
2832 | } | 2835 | } |
2833 | } else { | 2836 | } else { |
@@ -2990,13 +2993,17 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses, | |||
2990 | cpu_to_le16(len); | 2993 | cpu_to_le16(len); |
2991 | } | 2994 | } |
2992 | 2995 | ||
2993 | /* SecurityBlob->WorkstationName.Length = cifs_strtoUCS((__le16 *) bcc_ptr, "AMACHINE",64, nls_codepage); | 2996 | /* SecurityBlob->WorkstationName.Length = |
2997 | cifs_strtoUCS((__le16 *) bcc_ptr, "AMACHINE",64, nls_codepage); | ||
2994 | SecurityBlob->WorkstationName.Length *= 2; | 2998 | SecurityBlob->WorkstationName.Length *= 2; |
2995 | SecurityBlob->WorkstationName.MaximumLength = cpu_to_le16(SecurityBlob->WorkstationName.Length); | 2999 | SecurityBlob->WorkstationName.MaximumLength = |
2996 | SecurityBlob->WorkstationName.Buffer = cpu_to_le32(SecurityBlobLength); | 3000 | cpu_to_le16(SecurityBlob->WorkstationName.Length); |
3001 | SecurityBlob->WorkstationName.Buffer = | ||
3002 | cpu_to_le32(SecurityBlobLength); | ||
2997 | bcc_ptr += SecurityBlob->WorkstationName.Length; | 3003 | bcc_ptr += SecurityBlob->WorkstationName.Length; |
2998 | SecurityBlobLength += SecurityBlob->WorkstationName.Length; | 3004 | SecurityBlobLength += SecurityBlob->WorkstationName.Length; |
2999 | SecurityBlob->WorkstationName.Length = cpu_to_le16(SecurityBlob->WorkstationName.Length); */ | 3005 | SecurityBlob->WorkstationName.Length = |
3006 | cpu_to_le16(SecurityBlob->WorkstationName.Length); */ | ||
3000 | 3007 | ||
3001 | if ((long) bcc_ptr % 2) { | 3008 | if ((long) bcc_ptr % 2) { |
3002 | *bcc_ptr = 0; | 3009 | *bcc_ptr = 0; |
@@ -3202,7 +3209,7 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses, | |||
3202 | len = strnlen(bcc_ptr, 1024); | 3209 | len = strnlen(bcc_ptr, 1024); |
3203 | if (((long) bcc_ptr + len) - | 3210 | if (((long) bcc_ptr + len) - |
3204 | (long) pByteArea(smb_buffer_response) | 3211 | (long) pByteArea(smb_buffer_response) |
3205 | <= BCC(smb_buffer_response)) { | 3212 | <= BCC(smb_buffer_response)) { |
3206 | if (ses->serverOS) | 3213 | if (ses->serverOS) |
3207 | kfree(ses->serverOS); | 3214 | kfree(ses->serverOS); |
3208 | ses->serverOS = kzalloc(len + 1,GFP_KERNEL); | 3215 | ses->serverOS = kzalloc(len + 1,GFP_KERNEL); |
@@ -3216,7 +3223,8 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses, | |||
3216 | kfree(ses->serverNOS); | 3223 | kfree(ses->serverNOS); |
3217 | ses->serverNOS = kzalloc(len+1, | 3224 | ses->serverNOS = kzalloc(len+1, |
3218 | GFP_KERNEL); | 3225 | GFP_KERNEL); |
3219 | strncpy(ses->serverNOS, bcc_ptr, len); | 3226 | strncpy(ses->serverNOS, |
3227 | bcc_ptr, len); | ||
3220 | bcc_ptr += len; | 3228 | bcc_ptr += len; |
3221 | bcc_ptr[0] = 0; | 3229 | bcc_ptr[0] = 0; |
3222 | bcc_ptr++; | 3230 | bcc_ptr++; |
@@ -3224,19 +3232,24 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses, | |||
3224 | len = strnlen(bcc_ptr, 1024); | 3232 | len = strnlen(bcc_ptr, 1024); |
3225 | if (ses->serverDomain) | 3233 | if (ses->serverDomain) |
3226 | kfree(ses->serverDomain); | 3234 | kfree(ses->serverDomain); |
3227 | ses->serverDomain = kzalloc(len+1,GFP_KERNEL); | 3235 | ses->serverDomain = |
3228 | strncpy(ses->serverDomain, bcc_ptr, len); | 3236 | kzalloc(len+1, |
3237 | GFP_KERNEL); | ||
3238 | strncpy(ses->serverDomain, | ||
3239 | bcc_ptr, len); | ||
3229 | bcc_ptr += len; | 3240 | bcc_ptr += len; |
3230 | bcc_ptr[0] = 0; | 3241 | bcc_ptr[0] = 0; |
3231 | bcc_ptr++; | 3242 | bcc_ptr++; |
3232 | } else | 3243 | } else |
3233 | cFYI(1, | 3244 | cFYI(1, |
3234 | ("Variable field of length %d extends beyond end of smb ", | 3245 | ("field of length %d " |
3246 | "extends beyond end of smb ", | ||
3235 | len)); | 3247 | len)); |
3236 | } | 3248 | } |
3237 | } else { | 3249 | } else { |
3238 | cERROR(1, | 3250 | cERROR(1, |
3239 | (" Security Blob Length extends beyond end of SMB")); | 3251 | (" Security Blob extends beyond end " |
3252 | "of SMB")); | ||
3240 | } | 3253 | } |
3241 | } else { | 3254 | } else { |
3242 | cERROR(1, ("No session structure passed in.")); | 3255 | cERROR(1, ("No session structure passed in.")); |
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 0620feaaea66..0a39491280d1 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -502,7 +502,8 @@ int cifs_close(struct inode *inode, struct file *file) | |||
502 | timeout *= 4; | 502 | timeout *= 4; |
503 | } | 503 | } |
504 | if (atomic_read(&pSMBFile->wrtPending)) | 504 | if (atomic_read(&pSMBFile->wrtPending)) |
505 | cERROR(1,("close with pending writes")); | 505 | cERROR(1, |
506 | ("close with pending writes")); | ||
506 | rc = CIFSSMBClose(xid, pTcon, | 507 | rc = CIFSSMBClose(xid, pTcon, |
507 | pSMBFile->netfid); | 508 | pSMBFile->netfid); |
508 | } | 509 | } |
@@ -1285,7 +1286,7 @@ retry: | |||
1285 | 1); | 1286 | 1); |
1286 | atomic_dec(&open_file->wrtPending); | 1287 | atomic_dec(&open_file->wrtPending); |
1287 | if (rc || bytes_written < bytes_to_write) { | 1288 | if (rc || bytes_written < bytes_to_write) { |
1288 | cERROR(1,("Write2 ret %d, written = %d", | 1289 | cERROR(1, ("Write2 ret %d, wrote %d", |
1289 | rc, bytes_written)); | 1290 | rc, bytes_written)); |
1290 | /* BB what if continued retry is | 1291 | /* BB what if continued retry is |
1291 | requested via mount flags? */ | 1292 | requested via mount flags? */ |
diff --git a/fs/cifs/link.c b/fs/cifs/link.c index e79b1c3e5f39..7da755c6550a 100644 --- a/fs/cifs/link.c +++ b/fs/cifs/link.c | |||
@@ -287,7 +287,8 @@ cifs_readlink(struct dentry *direntry, char __user *pBuffer, int buflen) | |||
287 | fid, | 287 | fid, |
288 | cifs_sb->local_nls); | 288 | cifs_sb->local_nls); |
289 | if (CIFSSMBClose(xid, pTcon, fid)) { | 289 | if (CIFSSMBClose(xid, pTcon, fid)) { |
290 | cFYI(1,("Error closing junction point (open for ioctl)")); | 290 | cFYI(1, ("Error closing junction point " |
291 | "(open for ioctl)")); | ||
291 | } | 292 | } |
292 | if (rc == -EIO) { | 293 | if (rc == -EIO) { |
293 | /* Query if DFS Junction */ | 294 | /* Query if DFS Junction */ |
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c index 21a2c46334e1..0bcec0844bee 100644 --- a/fs/cifs/misc.c +++ b/fs/cifs/misc.c | |||
@@ -353,7 +353,8 @@ header_assemble(struct smb_hdr *buffer, char smb_command /* command */ , | |||
353 | /* with userid/password pairs found on the smb session */ | 353 | /* with userid/password pairs found on the smb session */ |
354 | /* for other target tcp/ip addresses BB */ | 354 | /* for other target tcp/ip addresses BB */ |
355 | if (current->fsuid != treeCon->ses->linux_uid) { | 355 | if (current->fsuid != treeCon->ses->linux_uid) { |
356 | cFYI(1,("Multiuser mode and UID did not match tcon uid")); | 356 | cFYI(1, ("Multiuser mode and UID " |
357 | "did not match tcon uid")); | ||
357 | read_lock(&GlobalSMBSeslock); | 358 | read_lock(&GlobalSMBSeslock); |
358 | list_for_each(temp_item, &GlobalSMBSessionList) { | 359 | list_for_each(temp_item, &GlobalSMBSessionList) { |
359 | ses = list_entry(temp_item, struct cifsSesInfo, cifsSessionList); | 360 | ses = list_entry(temp_item, struct cifsSesInfo, cifsSessionList); |
@@ -461,7 +462,8 @@ checkSMB(struct smb_hdr *smb, __u16 mid, unsigned int length) | |||
461 | clc_len = smbCalcSize_LE(smb); | 462 | clc_len = smbCalcSize_LE(smb); |
462 | 463 | ||
463 | if (4 + len != length) { | 464 | if (4 + len != length) { |
464 | cERROR(1, ("Length read does not match RFC1001 length %d",len)); | 465 | cERROR(1, ("Length read does not match RFC1001 length %d", |
466 | len)); | ||
465 | return 1; | 467 | return 1; |
466 | } | 468 | } |
467 | 469 | ||
@@ -516,7 +518,8 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv) | |||
516 | 518 | ||
517 | pnotify = (struct file_notify_information *) | 519 | pnotify = (struct file_notify_information *) |
518 | ((char *)&pSMBr->hdr.Protocol + data_offset); | 520 | ((char *)&pSMBr->hdr.Protocol + data_offset); |
519 | cFYI(1,("dnotify on %s Action: 0x%x", pnotify->FileName, | 521 | cFYI(1, ("dnotify on %s Action: 0x%x", |
522 | pnotify->FileName, | ||
520 | pnotify->Action)); /* BB removeme BB */ | 523 | pnotify->Action)); /* BB removeme BB */ |
521 | /* cifs_dump_mem("Rcvd notify Data: ",buf, | 524 | /* cifs_dump_mem("Rcvd notify Data: ",buf, |
522 | sizeof(struct smb_hdr)+60); */ | 525 | sizeof(struct smb_hdr)+60); */ |
@@ -567,7 +570,8 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv) | |||
567 | if (pSMB->Fid == netfile->netfid) { | 570 | if (pSMB->Fid == netfile->netfid) { |
568 | struct cifsInodeInfo *pCifsInode; | 571 | struct cifsInodeInfo *pCifsInode; |
569 | read_unlock(&GlobalSMBSeslock); | 572 | read_unlock(&GlobalSMBSeslock); |
570 | cFYI(1,("file id match, oplock break")); | 573 | cFYI(1, |
574 | ("file id match, oplock break")); | ||
571 | pCifsInode = | 575 | pCifsInode = |
572 | CIFS_I(netfile->pInode); | 576 | CIFS_I(netfile->pInode); |
573 | pCifsInode->clientCanCacheAll = FALSE; | 577 | pCifsInode->clientCanCacheAll = FALSE; |
@@ -578,7 +582,8 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv) | |||
578 | AllocOplockQEntry(netfile->pInode, | 582 | AllocOplockQEntry(netfile->pInode, |
579 | netfile->netfid, | 583 | netfile->netfid, |
580 | tcon); | 584 | tcon); |
581 | cFYI(1,("about to wake up oplock thd")); | 585 | cFYI(1, |
586 | ("about to wake up oplock thread")); | ||
582 | if (oplockThread) | 587 | if (oplockThread) |
583 | wake_up_process(oplockThread); | 588 | wake_up_process(oplockThread); |
584 | return TRUE; | 589 | return TRUE; |
diff --git a/fs/cifs/netmisc.c b/fs/cifs/netmisc.c index fe3d910efeb7..2bfed3f45d0f 100644 --- a/fs/cifs/netmisc.c +++ b/fs/cifs/netmisc.c | |||
@@ -789,7 +789,8 @@ map_smb_to_linux_error(struct smb_hdr *smb) | |||
789 | sizeof (struct smb_to_posix_error); i++) { | 789 | sizeof (struct smb_to_posix_error); i++) { |
790 | if (mapping_table_ERRDOS[i].smb_err == 0) | 790 | if (mapping_table_ERRDOS[i].smb_err == 0) |
791 | break; | 791 | break; |
792 | else if (mapping_table_ERRDOS[i].smb_err == smberrcode) { | 792 | else if (mapping_table_ERRDOS[i].smb_err == |
793 | smberrcode) { | ||
793 | rc = mapping_table_ERRDOS[i].posix_code; | 794 | rc = mapping_table_ERRDOS[i].posix_code; |
794 | break; | 795 | break; |
795 | } | 796 | } |
@@ -802,7 +803,8 @@ map_smb_to_linux_error(struct smb_hdr *smb) | |||
802 | sizeof (struct smb_to_posix_error); i++) { | 803 | sizeof (struct smb_to_posix_error); i++) { |
803 | if (mapping_table_ERRSRV[i].smb_err == 0) | 804 | if (mapping_table_ERRSRV[i].smb_err == 0) |
804 | break; | 805 | break; |
805 | else if (mapping_table_ERRSRV[i].smb_err == smberrcode) { | 806 | else if (mapping_table_ERRSRV[i].smb_err == |
807 | smberrcode) { | ||
806 | rc = mapping_table_ERRSRV[i].posix_code; | 808 | rc = mapping_table_ERRSRV[i].posix_code; |
807 | break; | 809 | break; |
808 | } | 810 | } |
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c index a1e6f7f45b13..2ea027dda215 100644 --- a/fs/cifs/sess.c +++ b/fs/cifs/sess.c | |||
@@ -535,7 +535,8 @@ CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, int first_time, | |||
535 | rc = decode_unicode_ssetup(&bcc_ptr, bytes_remaining, | 535 | rc = decode_unicode_ssetup(&bcc_ptr, bytes_remaining, |
536 | ses, nls_cp); | 536 | ses, nls_cp); |
537 | else | 537 | else |
538 | rc = decode_ascii_ssetup(&bcc_ptr, bytes_remaining, ses,nls_cp); | 538 | rc = decode_ascii_ssetup(&bcc_ptr, bytes_remaining, |
539 | ses, nls_cp); | ||
539 | 540 | ||
540 | ssetup_exit: | 541 | ssetup_exit: |
541 | kfree(str_area); | 542 | kfree(str_area); |
diff --git a/fs/cifs/xattr.c b/fs/cifs/xattr.c index 836c39e7c09a..f61e433d281c 100644 --- a/fs/cifs/xattr.c +++ b/fs/cifs/xattr.c | |||
@@ -184,7 +184,8 @@ int cifs_setxattr(struct dentry *direntry, const char *ea_name, | |||
184 | cFYI(1, ("set default POSIX ACL not supported")); | 184 | cFYI(1, ("set default POSIX ACL not supported")); |
185 | #endif | 185 | #endif |
186 | } else { | 186 | } else { |
187 | cFYI(1, ("illegal xattr request %s (only user namespace supported)", ea_name)); | 187 | cFYI(1, ("illegal xattr request %s (only user namespace" |
188 | " supported)", ea_name)); | ||
188 | /* BB what if no namespace prefix? */ | 189 | /* BB what if no namespace prefix? */ |
189 | /* Should we just pass them to server, except for | 190 | /* Should we just pass them to server, except for |
190 | system and perhaps security prefixes? */ | 191 | system and perhaps security prefixes? */ |