mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
[CIFS] More whitespace/formatting fixes (noticed by checkpatch)
Signed-off-by: Steve French <sfrench@us.ibm.com>
This commit is contained in:
parent
7e42ca886b
commit
63135e088a
10 changed files with 88 additions and 46 deletions
|
@ -109,7 +109,8 @@ static int cifs_calc_signature2(const struct kvec *iov, int n_vec,
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
if (iov[0].iov_len <= 8 ) /* cmd field at offset 9 */
|
if (iov[0].iov_len <= 8 ) /* cmd field at offset 9 */
|
||||||
break; /* nothing to sign or corrupt header */
|
break; /* nothing to sign or corrupt header */
|
||||||
MD5Update(&context,iov[0].iov_base+4, iov[0].iov_len-4);
|
MD5Update(&context, iov[0].iov_base+4,
|
||||||
|
iov[0].iov_len-4);
|
||||||
} else
|
} else
|
||||||
MD5Update(&context, iov[i].iov_base, iov[i].iov_len);
|
MD5Update(&context, iov[i].iov_base, iov[i].iov_len);
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,16 +71,20 @@ static struct task_struct *dnotifyThread = NULL;
|
||||||
static const struct super_operations cifs_super_ops;
|
static const struct super_operations cifs_super_ops;
|
||||||
unsigned int CIFSMaxBufSize = CIFS_MAX_MSGSIZE;
|
unsigned int CIFSMaxBufSize = CIFS_MAX_MSGSIZE;
|
||||||
module_param(CIFSMaxBufSize, int, 0);
|
module_param(CIFSMaxBufSize, int, 0);
|
||||||
MODULE_PARM_DESC(CIFSMaxBufSize,"Network buffer size (not including header). Default: 16384 Range: 8192 to 130048");
|
MODULE_PARM_DESC(CIFSMaxBufSize, "Network buffer size (not including header). "
|
||||||
|
"Default: 16384 Range: 8192 to 130048");
|
||||||
unsigned int cifs_min_rcv = CIFS_MIN_RCV_POOL;
|
unsigned int cifs_min_rcv = CIFS_MIN_RCV_POOL;
|
||||||
module_param(cifs_min_rcv, int, 0);
|
module_param(cifs_min_rcv, int, 0);
|
||||||
MODULE_PARM_DESC(cifs_min_rcv,"Network buffers in pool. Default: 4 Range: 1 to 64");
|
MODULE_PARM_DESC(cifs_min_rcv, "Network buffers in pool. Default: 4 Range: "
|
||||||
|
"1 to 64");
|
||||||
unsigned int cifs_min_small = 30;
|
unsigned int cifs_min_small = 30;
|
||||||
module_param(cifs_min_small, int, 0);
|
module_param(cifs_min_small, int, 0);
|
||||||
MODULE_PARM_DESC(cifs_min_small,"Small network buffers in pool. Default: 30 Range: 2 to 256");
|
MODULE_PARM_DESC(cifs_min_small, "Small network buffers in pool. Default: 30 "
|
||||||
|
"Range: 2 to 256");
|
||||||
unsigned int cifs_max_pending = CIFS_MAX_REQ;
|
unsigned int cifs_max_pending = CIFS_MAX_REQ;
|
||||||
module_param(cifs_max_pending, int, 0);
|
module_param(cifs_max_pending, int, 0);
|
||||||
MODULE_PARM_DESC(cifs_max_pending,"Simultaneous requests to server. Default: 50 Range: 2 to 256");
|
MODULE_PARM_DESC(cifs_max_pending, "Simultaneous requests to server. "
|
||||||
|
"Default: 50 Range: 2 to 256");
|
||||||
|
|
||||||
extern mempool_t *cifs_sm_req_poolp;
|
extern mempool_t *cifs_sm_req_poolp;
|
||||||
extern mempool_t *cifs_req_poolp;
|
extern mempool_t *cifs_req_poolp;
|
||||||
|
@ -902,7 +906,8 @@ static int cifs_oplock_thread(void *dummyarg)
|
||||||
0 /* len */ , 0 /* offset */, 0,
|
0 /* len */ , 0 /* offset */, 0,
|
||||||
0, LOCKING_ANDX_OPLOCK_RELEASE,
|
0, LOCKING_ANDX_OPLOCK_RELEASE,
|
||||||
0 /* wait flag */);
|
0 /* wait flag */);
|
||||||
cFYI(1,("Oplock release rc = %d ", rc));
|
cFYI(1,
|
||||||
|
("Oplock release rc = %d ", rc));
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
spin_unlock(&GlobalMid_Lock);
|
spin_unlock(&GlobalMid_Lock);
|
||||||
|
@ -1040,7 +1045,7 @@ init_cifs(void)
|
||||||
static void __exit
|
static void __exit
|
||||||
exit_cifs(void)
|
exit_cifs(void)
|
||||||
{
|
{
|
||||||
cFYI(0, ("In unregister ie exit_cifs"));
|
cFYI(0, ("exit_cifs"));
|
||||||
#ifdef CONFIG_PROC_FS
|
#ifdef CONFIG_PROC_FS
|
||||||
cifs_proc_clean();
|
cifs_proc_clean();
|
||||||
#endif
|
#endif
|
||||||
|
@ -1055,7 +1060,8 @@ exit_cifs(void)
|
||||||
MODULE_AUTHOR("Steve French <sfrench@us.ibm.com>");
|
MODULE_AUTHOR("Steve French <sfrench@us.ibm.com>");
|
||||||
MODULE_LICENSE("GPL"); /* combination of LGPL + GPL source behaves as GPL */
|
MODULE_LICENSE("GPL"); /* combination of LGPL + GPL source behaves as GPL */
|
||||||
MODULE_DESCRIPTION
|
MODULE_DESCRIPTION
|
||||||
("VFS to access servers complying with the SNIA CIFS Specification e.g. Samba and Windows");
|
("VFS to access servers complying with the SNIA CIFS Specification "
|
||||||
|
"e.g. Samba and Windows");
|
||||||
MODULE_VERSION(CIFS_VERSION);
|
MODULE_VERSION(CIFS_VERSION);
|
||||||
module_init(init_cifs)
|
module_init(init_cifs)
|
||||||
module_exit(exit_cifs)
|
module_exit(exit_cifs)
|
||||||
|
|
|
@ -132,10 +132,13 @@ small_smb_init(int smb_command, int wct, struct cifsTconInfo *tcon,
|
||||||
/* Give Demultiplex thread up to 10 seconds to
|
/* Give Demultiplex thread up to 10 seconds to
|
||||||
reconnect, should be greater than cifs socket
|
reconnect, should be greater than cifs socket
|
||||||
timeout which is 7 seconds */
|
timeout which is 7 seconds */
|
||||||
while(tcon->ses->server->tcpStatus == CifsNeedReconnect) {
|
while(tcon->ses->server->tcpStatus ==
|
||||||
|
CifsNeedReconnect) {
|
||||||
wait_event_interruptible_timeout(tcon->ses->server->response_q,
|
wait_event_interruptible_timeout(tcon->ses->server->response_q,
|
||||||
(tcon->ses->server->tcpStatus == CifsGood), 10 * HZ);
|
(tcon->ses->server->tcpStatus ==
|
||||||
if (tcon->ses->server->tcpStatus == CifsNeedReconnect) {
|
CifsGood), 10 * HZ);
|
||||||
|
if (tcon->ses->server->tcpStatus ==
|
||||||
|
CifsNeedReconnect) {
|
||||||
/* on "soft" mounts we wait once */
|
/* on "soft" mounts we wait once */
|
||||||
if ((tcon->retry == FALSE) ||
|
if ((tcon->retry == FALSE) ||
|
||||||
(tcon->ses->status == CifsExiting)) {
|
(tcon->ses->status == CifsExiting)) {
|
||||||
|
@ -209,7 +212,8 @@ small_smb_init(int smb_command, int wct, struct cifsTconInfo *tcon,
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
header_assemble((struct smb_hdr *) *request_buf, smb_command, tcon,wct);
|
header_assemble((struct smb_hdr *) *request_buf, smb_command,
|
||||||
|
tcon,wct);
|
||||||
|
|
||||||
if (tcon != NULL)
|
if (tcon != NULL)
|
||||||
cifs_stats_inc(&tcon->num_smbs_sent);
|
cifs_stats_inc(&tcon->num_smbs_sent);
|
||||||
|
@ -274,9 +278,11 @@ smb_init(int smb_command, int wct, struct cifsTconInfo *tcon,
|
||||||
/* Give Demultiplex thread up to 10 seconds to
|
/* Give Demultiplex thread up to 10 seconds to
|
||||||
reconnect, should be greater than cifs socket
|
reconnect, should be greater than cifs socket
|
||||||
timeout which is 7 seconds */
|
timeout which is 7 seconds */
|
||||||
while(tcon->ses->server->tcpStatus == CifsNeedReconnect) {
|
while (tcon->ses->server->tcpStatus ==
|
||||||
|
CifsNeedReconnect) {
|
||||||
wait_event_interruptible_timeout(tcon->ses->server->response_q,
|
wait_event_interruptible_timeout(tcon->ses->server->response_q,
|
||||||
(tcon->ses->server->tcpStatus == CifsGood), 10 * HZ);
|
(tcon->ses->server->tcpStatus ==
|
||||||
|
CifsGood), 10 * HZ);
|
||||||
if (tcon->ses->server->tcpStatus ==
|
if (tcon->ses->server->tcpStatus ==
|
||||||
CifsNeedReconnect) {
|
CifsNeedReconnect) {
|
||||||
/* on "soft" mounts we wait once */
|
/* on "soft" mounts we wait once */
|
||||||
|
@ -381,7 +387,8 @@ static int validate_t2(struct smb_t2_rsp *pSMB)
|
||||||
/* check that bcc is less than negotiated smb buffer */
|
/* check that bcc is less than negotiated smb buffer */
|
||||||
total_size = le16_to_cpu(pSMB->t2_rsp.ParameterCount);
|
total_size = le16_to_cpu(pSMB->t2_rsp.ParameterCount);
|
||||||
if (total_size < 512) {
|
if (total_size < 512) {
|
||||||
total_size+=le16_to_cpu(pSMB->t2_rsp.DataCount);
|
total_size +=
|
||||||
|
le16_to_cpu(pSMB->t2_rsp.DataCount);
|
||||||
/* BCC le converted in SendReceive */
|
/* BCC le converted in SendReceive */
|
||||||
pBCC = (pSMB->hdr.WordCount * 2) +
|
pBCC = (pSMB->hdr.WordCount * 2) +
|
||||||
sizeof(struct smb_hdr) +
|
sizeof(struct smb_hdr) +
|
||||||
|
@ -2608,7 +2615,7 @@ CIFSSMBQueryReparseLinkInfo(const int xid, struct cifsTconInfo *tcon,
|
||||||
reparse_buf->TargetNameOffset +
|
reparse_buf->TargetNameOffset +
|
||||||
reparse_buf->TargetNameLen) >
|
reparse_buf->TargetNameLen) >
|
||||||
end_of_smb) {
|
end_of_smb) {
|
||||||
cFYI(1,("reparse buf extended beyond SMB"));
|
cFYI(1,("reparse buf goes beyond SMB"));
|
||||||
rc = -EIO;
|
rc = -EIO;
|
||||||
goto qreparse_out;
|
goto qreparse_out;
|
||||||
}
|
}
|
||||||
|
@ -2632,7 +2639,8 @@ CIFSSMBQueryReparseLinkInfo(const int xid, struct cifsTconInfo *tcon,
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
rc = -EIO;
|
rc = -EIO;
|
||||||
cFYI(1,("Invalid return data count on get reparse info ioctl"));
|
cFYI(1, ("Invalid return data count on "
|
||||||
|
"get reparse info ioctl"));
|
||||||
}
|
}
|
||||||
symlinkinfo[buflen] = 0; /* just in case so the caller
|
symlinkinfo[buflen] = 0; /* just in case so the caller
|
||||||
does not go off the end of the buffer */
|
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,
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
count = posix_acl_xattr_count((size_t)buflen);
|
count = posix_acl_xattr_count((size_t)buflen);
|
||||||
cFYI(1,("setting acl with %d entries from buf of length %d and version of %d",
|
cFYI(1,("setting acl with %d entries from buf of length %d and "
|
||||||
|
"version of %d",
|
||||||
count, buflen, le32_to_cpu(local_acl->a_version)));
|
count, buflen, le32_to_cpu(local_acl->a_version)));
|
||||||
if (le32_to_cpu(local_acl->a_version) != 2) {
|
if (le32_to_cpu(local_acl->a_version) != 2) {
|
||||||
cFYI(1, ("unknown POSIX ACL version %d",
|
cFYI(1, ("unknown POSIX ACL version %d",
|
||||||
|
@ -3957,7 +3966,9 @@ getDFSRetry:
|
||||||
(8 /* sizeof start of data block */ +
|
(8 /* sizeof start of data block */ +
|
||||||
data_offset +
|
data_offset +
|
||||||
(char *) &pSMBr->hdr.Protocol);
|
(char *) &pSMBr->hdr.Protocol);
|
||||||
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",
|
cFYI(1,("num_referrals: %d dfs flags: 0x%x ... \n"
|
||||||
|
"for referral one refer size: 0x%x srv "
|
||||||
|
"type: 0x%x refer flags: 0x%x ttl: 0x%x",
|
||||||
le16_to_cpu(pSMBr->NumberOfReferrals),
|
le16_to_cpu(pSMBr->NumberOfReferrals),
|
||||||
le16_to_cpu(pSMBr->DFSFlags),
|
le16_to_cpu(pSMBr->DFSFlags),
|
||||||
le16_to_cpu(referrals->ReferralSize),
|
le16_to_cpu(referrals->ReferralSize),
|
||||||
|
|
|
@ -278,7 +278,7 @@ static int coalesce_t2(struct smb_hdr *psecond, struct smb_hdr *pTargetSMB)
|
||||||
total_data_size = le16_to_cpu(pSMBt->t2_rsp.TotalDataCount);
|
total_data_size = le16_to_cpu(pSMBt->t2_rsp.TotalDataCount);
|
||||||
|
|
||||||
if (total_data_size != le16_to_cpu(pSMB2->t2_rsp.TotalDataCount)) {
|
if (total_data_size != le16_to_cpu(pSMB2->t2_rsp.TotalDataCount)) {
|
||||||
cFYI(1, ("total data sizes of primary and secondary t2 differ"));
|
cFYI(1, ("total data size of primary and secondary t2 differ"));
|
||||||
}
|
}
|
||||||
|
|
||||||
total_in_buf = le16_to_cpu(pSMBt->t2_rsp.DataCount);
|
total_in_buf = le16_to_cpu(pSMBt->t2_rsp.DataCount);
|
||||||
|
@ -1036,7 +1036,8 @@ cifs_parse_mount_options(char *options, const char *devname,
|
||||||
}
|
}
|
||||||
} else if (strnicmp(data, "iocharset", 9) == 0) {
|
} else if (strnicmp(data, "iocharset", 9) == 0) {
|
||||||
if (!value || !*value) {
|
if (!value || !*value) {
|
||||||
printk(KERN_WARNING "CIFS: invalid iocharset specified\n");
|
printk(KERN_WARNING "CIFS: invalid iocharset "
|
||||||
|
"specified\n");
|
||||||
return 1; /* needs_arg; */
|
return 1; /* needs_arg; */
|
||||||
}
|
}
|
||||||
if (strnlen(value, 65) < 65) {
|
if (strnlen(value, 65) < 65) {
|
||||||
|
@ -1046,7 +1047,8 @@ cifs_parse_mount_options(char *options, const char *devname,
|
||||||
is used by caller */
|
is used by caller */
|
||||||
cFYI(1, ("iocharset set to %s", value));
|
cFYI(1, ("iocharset set to %s", value));
|
||||||
} else {
|
} else {
|
||||||
printk(KERN_WARNING "CIFS: iocharset name too long.\n");
|
printk(KERN_WARNING "CIFS: iocharset name "
|
||||||
|
"too long.\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
} else if (strnicmp(data, "uid", 3) == 0) {
|
} else if (strnicmp(data, "uid", 3) == 0) {
|
||||||
|
@ -1098,7 +1100,7 @@ cifs_parse_mount_options(char *options, const char *devname,
|
||||||
}
|
}
|
||||||
} else if (strnicmp(data, "netbiosname", 4) == 0) {
|
} else if (strnicmp(data, "netbiosname", 4) == 0) {
|
||||||
if (!value || !*value || (*value == ' ')) {
|
if (!value || !*value || (*value == ' ')) {
|
||||||
cFYI(1, ("invalid (empty) netbiosname specified"));
|
cFYI(1, ("invalid (empty) netbiosname"));
|
||||||
} else {
|
} else {
|
||||||
memset(vol->source_rfc1001_name, 0x20, 15);
|
memset(vol->source_rfc1001_name, 0x20, 15);
|
||||||
for (i = 0; i < 15; i++) {
|
for (i = 0; i < 15; i++) {
|
||||||
|
@ -2827,7 +2829,8 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned int xid,
|
||||||
bcc_ptr++;
|
bcc_ptr++;
|
||||||
} else
|
} else
|
||||||
cFYI(1,
|
cFYI(1,
|
||||||
("Variable field of length %d extends beyond end of smb",
|
("field of length %d "
|
||||||
|
"extends beyond end of smb",
|
||||||
len));
|
len));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -2990,13 +2993,17 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses,
|
||||||
cpu_to_le16(len);
|
cpu_to_le16(len);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* SecurityBlob->WorkstationName.Length = cifs_strtoUCS((__le16 *) bcc_ptr, "AMACHINE",64, nls_codepage);
|
/* SecurityBlob->WorkstationName.Length =
|
||||||
|
cifs_strtoUCS((__le16 *) bcc_ptr, "AMACHINE",64, nls_codepage);
|
||||||
SecurityBlob->WorkstationName.Length *= 2;
|
SecurityBlob->WorkstationName.Length *= 2;
|
||||||
SecurityBlob->WorkstationName.MaximumLength = cpu_to_le16(SecurityBlob->WorkstationName.Length);
|
SecurityBlob->WorkstationName.MaximumLength =
|
||||||
SecurityBlob->WorkstationName.Buffer = cpu_to_le32(SecurityBlobLength);
|
cpu_to_le16(SecurityBlob->WorkstationName.Length);
|
||||||
|
SecurityBlob->WorkstationName.Buffer =
|
||||||
|
cpu_to_le32(SecurityBlobLength);
|
||||||
bcc_ptr += SecurityBlob->WorkstationName.Length;
|
bcc_ptr += SecurityBlob->WorkstationName.Length;
|
||||||
SecurityBlobLength += SecurityBlob->WorkstationName.Length;
|
SecurityBlobLength += SecurityBlob->WorkstationName.Length;
|
||||||
SecurityBlob->WorkstationName.Length = cpu_to_le16(SecurityBlob->WorkstationName.Length); */
|
SecurityBlob->WorkstationName.Length =
|
||||||
|
cpu_to_le16(SecurityBlob->WorkstationName.Length); */
|
||||||
|
|
||||||
if ((long) bcc_ptr % 2) {
|
if ((long) bcc_ptr % 2) {
|
||||||
*bcc_ptr = 0;
|
*bcc_ptr = 0;
|
||||||
|
@ -3202,7 +3209,7 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses,
|
||||||
len = strnlen(bcc_ptr, 1024);
|
len = strnlen(bcc_ptr, 1024);
|
||||||
if (((long) bcc_ptr + len) -
|
if (((long) bcc_ptr + len) -
|
||||||
(long) pByteArea(smb_buffer_response)
|
(long) pByteArea(smb_buffer_response)
|
||||||
<= BCC(smb_buffer_response)) {
|
<= BCC(smb_buffer_response)) {
|
||||||
if (ses->serverOS)
|
if (ses->serverOS)
|
||||||
kfree(ses->serverOS);
|
kfree(ses->serverOS);
|
||||||
ses->serverOS = kzalloc(len + 1,GFP_KERNEL);
|
ses->serverOS = kzalloc(len + 1,GFP_KERNEL);
|
||||||
|
@ -3216,7 +3223,8 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses,
|
||||||
kfree(ses->serverNOS);
|
kfree(ses->serverNOS);
|
||||||
ses->serverNOS = kzalloc(len+1,
|
ses->serverNOS = kzalloc(len+1,
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
strncpy(ses->serverNOS, bcc_ptr, len);
|
strncpy(ses->serverNOS,
|
||||||
|
bcc_ptr, len);
|
||||||
bcc_ptr += len;
|
bcc_ptr += len;
|
||||||
bcc_ptr[0] = 0;
|
bcc_ptr[0] = 0;
|
||||||
bcc_ptr++;
|
bcc_ptr++;
|
||||||
|
@ -3224,19 +3232,24 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses,
|
||||||
len = strnlen(bcc_ptr, 1024);
|
len = strnlen(bcc_ptr, 1024);
|
||||||
if (ses->serverDomain)
|
if (ses->serverDomain)
|
||||||
kfree(ses->serverDomain);
|
kfree(ses->serverDomain);
|
||||||
ses->serverDomain = kzalloc(len+1,GFP_KERNEL);
|
ses->serverDomain =
|
||||||
strncpy(ses->serverDomain, bcc_ptr, len);
|
kzalloc(len+1,
|
||||||
|
GFP_KERNEL);
|
||||||
|
strncpy(ses->serverDomain,
|
||||||
|
bcc_ptr, len);
|
||||||
bcc_ptr += len;
|
bcc_ptr += len;
|
||||||
bcc_ptr[0] = 0;
|
bcc_ptr[0] = 0;
|
||||||
bcc_ptr++;
|
bcc_ptr++;
|
||||||
} else
|
} else
|
||||||
cFYI(1,
|
cFYI(1,
|
||||||
("Variable field of length %d extends beyond end of smb ",
|
("field of length %d "
|
||||||
|
"extends beyond end of smb ",
|
||||||
len));
|
len));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
cERROR(1,
|
cERROR(1,
|
||||||
(" Security Blob Length extends beyond end of SMB"));
|
(" Security Blob extends beyond end "
|
||||||
|
"of SMB"));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
cERROR(1, ("No session structure passed in."));
|
cERROR(1, ("No session structure passed in."));
|
||||||
|
|
|
@ -502,7 +502,8 @@ int cifs_close(struct inode *inode, struct file *file)
|
||||||
timeout *= 4;
|
timeout *= 4;
|
||||||
}
|
}
|
||||||
if (atomic_read(&pSMBFile->wrtPending))
|
if (atomic_read(&pSMBFile->wrtPending))
|
||||||
cERROR(1,("close with pending writes"));
|
cERROR(1,
|
||||||
|
("close with pending writes"));
|
||||||
rc = CIFSSMBClose(xid, pTcon,
|
rc = CIFSSMBClose(xid, pTcon,
|
||||||
pSMBFile->netfid);
|
pSMBFile->netfid);
|
||||||
}
|
}
|
||||||
|
@ -1285,7 +1286,7 @@ retry:
|
||||||
1);
|
1);
|
||||||
atomic_dec(&open_file->wrtPending);
|
atomic_dec(&open_file->wrtPending);
|
||||||
if (rc || bytes_written < bytes_to_write) {
|
if (rc || bytes_written < bytes_to_write) {
|
||||||
cERROR(1,("Write2 ret %d, written = %d",
|
cERROR(1, ("Write2 ret %d, wrote %d",
|
||||||
rc, bytes_written));
|
rc, bytes_written));
|
||||||
/* BB what if continued retry is
|
/* BB what if continued retry is
|
||||||
requested via mount flags? */
|
requested via mount flags? */
|
||||||
|
|
|
@ -287,7 +287,8 @@ cifs_readlink(struct dentry *direntry, char __user *pBuffer, int buflen)
|
||||||
fid,
|
fid,
|
||||||
cifs_sb->local_nls);
|
cifs_sb->local_nls);
|
||||||
if (CIFSSMBClose(xid, pTcon, fid)) {
|
if (CIFSSMBClose(xid, pTcon, fid)) {
|
||||||
cFYI(1,("Error closing junction point (open for ioctl)"));
|
cFYI(1, ("Error closing junction point "
|
||||||
|
"(open for ioctl)"));
|
||||||
}
|
}
|
||||||
if (rc == -EIO) {
|
if (rc == -EIO) {
|
||||||
/* Query if DFS Junction */
|
/* Query if DFS Junction */
|
||||||
|
|
|
@ -353,7 +353,8 @@ header_assemble(struct smb_hdr *buffer, char smb_command /* command */ ,
|
||||||
/* with userid/password pairs found on the smb session */
|
/* with userid/password pairs found on the smb session */
|
||||||
/* for other target tcp/ip addresses BB */
|
/* for other target tcp/ip addresses BB */
|
||||||
if (current->fsuid != treeCon->ses->linux_uid) {
|
if (current->fsuid != treeCon->ses->linux_uid) {
|
||||||
cFYI(1,("Multiuser mode and UID did not match tcon uid"));
|
cFYI(1, ("Multiuser mode and UID "
|
||||||
|
"did not match tcon uid"));
|
||||||
read_lock(&GlobalSMBSeslock);
|
read_lock(&GlobalSMBSeslock);
|
||||||
list_for_each(temp_item, &GlobalSMBSessionList) {
|
list_for_each(temp_item, &GlobalSMBSessionList) {
|
||||||
ses = list_entry(temp_item, struct cifsSesInfo, cifsSessionList);
|
ses = list_entry(temp_item, struct cifsSesInfo, cifsSessionList);
|
||||||
|
@ -461,7 +462,8 @@ checkSMB(struct smb_hdr *smb, __u16 mid, unsigned int length)
|
||||||
clc_len = smbCalcSize_LE(smb);
|
clc_len = smbCalcSize_LE(smb);
|
||||||
|
|
||||||
if (4 + len != length) {
|
if (4 + len != length) {
|
||||||
cERROR(1, ("Length read does not match RFC1001 length %d",len));
|
cERROR(1, ("Length read does not match RFC1001 length %d",
|
||||||
|
len));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -516,7 +518,8 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv)
|
||||||
|
|
||||||
pnotify = (struct file_notify_information *)
|
pnotify = (struct file_notify_information *)
|
||||||
((char *)&pSMBr->hdr.Protocol + data_offset);
|
((char *)&pSMBr->hdr.Protocol + data_offset);
|
||||||
cFYI(1,("dnotify on %s Action: 0x%x", pnotify->FileName,
|
cFYI(1, ("dnotify on %s Action: 0x%x",
|
||||||
|
pnotify->FileName,
|
||||||
pnotify->Action)); /* BB removeme BB */
|
pnotify->Action)); /* BB removeme BB */
|
||||||
/* cifs_dump_mem("Rcvd notify Data: ",buf,
|
/* cifs_dump_mem("Rcvd notify Data: ",buf,
|
||||||
sizeof(struct smb_hdr)+60); */
|
sizeof(struct smb_hdr)+60); */
|
||||||
|
@ -567,7 +570,8 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv)
|
||||||
if (pSMB->Fid == netfile->netfid) {
|
if (pSMB->Fid == netfile->netfid) {
|
||||||
struct cifsInodeInfo *pCifsInode;
|
struct cifsInodeInfo *pCifsInode;
|
||||||
read_unlock(&GlobalSMBSeslock);
|
read_unlock(&GlobalSMBSeslock);
|
||||||
cFYI(1,("file id match, oplock break"));
|
cFYI(1,
|
||||||
|
("file id match, oplock break"));
|
||||||
pCifsInode =
|
pCifsInode =
|
||||||
CIFS_I(netfile->pInode);
|
CIFS_I(netfile->pInode);
|
||||||
pCifsInode->clientCanCacheAll = FALSE;
|
pCifsInode->clientCanCacheAll = FALSE;
|
||||||
|
@ -578,7 +582,8 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv)
|
||||||
AllocOplockQEntry(netfile->pInode,
|
AllocOplockQEntry(netfile->pInode,
|
||||||
netfile->netfid,
|
netfile->netfid,
|
||||||
tcon);
|
tcon);
|
||||||
cFYI(1,("about to wake up oplock thd"));
|
cFYI(1,
|
||||||
|
("about to wake up oplock thread"));
|
||||||
if (oplockThread)
|
if (oplockThread)
|
||||||
wake_up_process(oplockThread);
|
wake_up_process(oplockThread);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
|
@ -789,7 +789,8 @@ map_smb_to_linux_error(struct smb_hdr *smb)
|
||||||
sizeof (struct smb_to_posix_error); i++) {
|
sizeof (struct smb_to_posix_error); i++) {
|
||||||
if (mapping_table_ERRDOS[i].smb_err == 0)
|
if (mapping_table_ERRDOS[i].smb_err == 0)
|
||||||
break;
|
break;
|
||||||
else if (mapping_table_ERRDOS[i].smb_err == smberrcode) {
|
else if (mapping_table_ERRDOS[i].smb_err ==
|
||||||
|
smberrcode) {
|
||||||
rc = mapping_table_ERRDOS[i].posix_code;
|
rc = mapping_table_ERRDOS[i].posix_code;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -802,7 +803,8 @@ map_smb_to_linux_error(struct smb_hdr *smb)
|
||||||
sizeof (struct smb_to_posix_error); i++) {
|
sizeof (struct smb_to_posix_error); i++) {
|
||||||
if (mapping_table_ERRSRV[i].smb_err == 0)
|
if (mapping_table_ERRSRV[i].smb_err == 0)
|
||||||
break;
|
break;
|
||||||
else if (mapping_table_ERRSRV[i].smb_err == smberrcode) {
|
else if (mapping_table_ERRSRV[i].smb_err ==
|
||||||
|
smberrcode) {
|
||||||
rc = mapping_table_ERRSRV[i].posix_code;
|
rc = mapping_table_ERRSRV[i].posix_code;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -535,7 +535,8 @@ CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, int first_time,
|
||||||
rc = decode_unicode_ssetup(&bcc_ptr, bytes_remaining,
|
rc = decode_unicode_ssetup(&bcc_ptr, bytes_remaining,
|
||||||
ses, nls_cp);
|
ses, nls_cp);
|
||||||
else
|
else
|
||||||
rc = decode_ascii_ssetup(&bcc_ptr, bytes_remaining, ses,nls_cp);
|
rc = decode_ascii_ssetup(&bcc_ptr, bytes_remaining,
|
||||||
|
ses, nls_cp);
|
||||||
|
|
||||||
ssetup_exit:
|
ssetup_exit:
|
||||||
kfree(str_area);
|
kfree(str_area);
|
||||||
|
|
|
@ -184,7 +184,8 @@ int cifs_setxattr(struct dentry *direntry, const char *ea_name,
|
||||||
cFYI(1, ("set default POSIX ACL not supported"));
|
cFYI(1, ("set default POSIX ACL not supported"));
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
cFYI(1, ("illegal xattr request %s (only user namespace supported)", ea_name));
|
cFYI(1, ("illegal xattr request %s (only user namespace"
|
||||||
|
" supported)", ea_name));
|
||||||
/* BB what if no namespace prefix? */
|
/* BB what if no namespace prefix? */
|
||||||
/* Should we just pass them to server, except for
|
/* Should we just pass them to server, except for
|
||||||
system and perhaps security prefixes? */
|
system and perhaps security prefixes? */
|
||||||
|
|
Loading…
Reference in a new issue