[CIFS] more whitespace cleanup
Signed-off-by: Steve French <sfrench@us.ibm.com>
This commit is contained in:
@@ -119,7 +119,8 @@ cifs_read_super(struct super_block *sb, void *data,
|
|||||||
sb->s_export_op = &cifs_export_ops;
|
sb->s_export_op = &cifs_export_ops;
|
||||||
#endif /* EXPERIMENTAL */
|
#endif /* EXPERIMENTAL */
|
||||||
/* if (cifs_sb->tcon->ses->server->maxBuf > MAX_CIFS_HDR_SIZE + 512)
|
/* if (cifs_sb->tcon->ses->server->maxBuf > MAX_CIFS_HDR_SIZE + 512)
|
||||||
sb->s_blocksize = cifs_sb->tcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE; */
|
sb->s_blocksize =
|
||||||
|
cifs_sb->tcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE; */
|
||||||
#ifdef CONFIG_CIFS_QUOTA
|
#ifdef CONFIG_CIFS_QUOTA
|
||||||
sb->s_qcop = &cifs_quotactl_ops;
|
sb->s_qcop = &cifs_quotactl_ops;
|
||||||
#endif
|
#endif
|
||||||
@@ -217,8 +218,7 @@ cifs_statfs(struct dentry *dentry, struct kstatfs *buf)
|
|||||||
bypassed it because we detected that this was an older LANMAN sess */
|
bypassed it because we detected that this was an older LANMAN sess */
|
||||||
if (rc)
|
if (rc)
|
||||||
rc = SMBOldQFSInfo(xid, pTcon, buf);
|
rc = SMBOldQFSInfo(xid, pTcon, buf);
|
||||||
/*
|
/* int f_type;
|
||||||
int f_type;
|
|
||||||
__fsid_t f_fsid;
|
__fsid_t f_fsid;
|
||||||
int f_namelen; */
|
int f_namelen; */
|
||||||
/* BB get from info in tcon struct at mount time call to QFSAttrInfo */
|
/* BB get from info in tcon struct at mount time call to QFSAttrInfo */
|
||||||
|
@@ -1433,7 +1433,7 @@ CIFSSMBWrite(const int xid, struct cifsTconInfo *tcon,
|
|||||||
pSMB->OffsetLow = cpu_to_le32(offset & 0xFFFFFFFF);
|
pSMB->OffsetLow = cpu_to_le32(offset & 0xFFFFFFFF);
|
||||||
if (wct == 14)
|
if (wct == 14)
|
||||||
pSMB->OffsetHigh = cpu_to_le32(offset >> 32);
|
pSMB->OffsetHigh = cpu_to_le32(offset >> 32);
|
||||||
else if((offset >> 32) > 0) /* can not handle this big offset for old */
|
else if ((offset >> 32) > 0) /* can not handle big offset for old srv */
|
||||||
return -EIO;
|
return -EIO;
|
||||||
|
|
||||||
pSMB->Reserved = 0xFFFFFFFF;
|
pSMB->Reserved = 0xFFFFFFFF;
|
||||||
@@ -1534,7 +1534,7 @@ CIFSSMBWrite2(const int xid, struct cifsTconInfo *tcon,
|
|||||||
pSMB->OffsetLow = cpu_to_le32(offset & 0xFFFFFFFF);
|
pSMB->OffsetLow = cpu_to_le32(offset & 0xFFFFFFFF);
|
||||||
if (wct == 14)
|
if (wct == 14)
|
||||||
pSMB->OffsetHigh = cpu_to_le32(offset >> 32);
|
pSMB->OffsetHigh = cpu_to_le32(offset >> 32);
|
||||||
else if((offset >> 32) > 0) /* can not handle this big offset for old */
|
else if ((offset >> 32) > 0) /* can not handle big offset for old srv */
|
||||||
return -EIO;
|
return -EIO;
|
||||||
pSMB->Reserved = 0xFFFFFFFF;
|
pSMB->Reserved = 0xFFFFFFFF;
|
||||||
pSMB->WriteMode = 0;
|
pSMB->WriteMode = 0;
|
||||||
@@ -2954,7 +2954,6 @@ GetExtAttrOut:
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif /* CONFIG_POSIX */
|
#endif /* CONFIG_POSIX */
|
||||||
|
|
||||||
|
|
||||||
@@ -3191,9 +3190,10 @@ QPathInfoRetry:
|
|||||||
else if (pFindData){
|
else if (pFindData){
|
||||||
int size;
|
int size;
|
||||||
__u16 data_offset = le16_to_cpu(pSMBr->t2.DataOffset);
|
__u16 data_offset = le16_to_cpu(pSMBr->t2.DataOffset);
|
||||||
if(legacy) /* we do not read the last field, EAsize, fortunately
|
if (legacy) /* we do not read the last field, EAsize,
|
||||||
since it varies by subdialect and on Set vs. Get, is
|
fortunately since it varies by subdialect
|
||||||
two bytes or 4 bytes depending but we don't care here */
|
and on Set vs. Get, is two bytes or 4
|
||||||
|
bytes depending but we don't care here */
|
||||||
size = sizeof(FILE_INFO_STANDARD);
|
size = sizeof(FILE_INFO_STANDARD);
|
||||||
else
|
else
|
||||||
size = sizeof(FILE_ALL_INFO);
|
size = sizeof(FILE_ALL_INFO);
|
||||||
@@ -5142,7 +5142,7 @@ QAllEAsRetry:
|
|||||||
struct fealist * ea_response_data;
|
struct fealist * ea_response_data;
|
||||||
rc = 0;
|
rc = 0;
|
||||||
/* validate_trans2_offsets() */
|
/* validate_trans2_offsets() */
|
||||||
/* BB to check if(start of smb + data_offset > &bcc+ bcc)*/
|
/* BB check if start of smb + data_offset > &bcc+ bcc */
|
||||||
ea_response_data = (struct fealist *)
|
ea_response_data = (struct fealist *)
|
||||||
(((char *) &pSMBr->hdr.Protocol) +
|
(((char *) &pSMBr->hdr.Protocol) +
|
||||||
data_offset);
|
data_offset);
|
||||||
@@ -5285,7 +5285,7 @@ QEARetry:
|
|||||||
struct fealist * ea_response_data;
|
struct fealist * ea_response_data;
|
||||||
rc = -ENODATA;
|
rc = -ENODATA;
|
||||||
/* validate_trans2_offsets() */
|
/* validate_trans2_offsets() */
|
||||||
/* BB to check if(start of smb + data_offset > &bcc+ bcc)*/
|
/* BB check if start of smb + data_offset > &bcc+ bcc*/
|
||||||
ea_response_data = (struct fealist *)
|
ea_response_data = (struct fealist *)
|
||||||
(((char *) &pSMBr->hdr.Protocol) +
|
(((char *) &pSMBr->hdr.Protocol) +
|
||||||
data_offset);
|
data_offset);
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* fs/cifs/misc.c
|
* fs/cifs/misc.c
|
||||||
*
|
*
|
||||||
* Copyright (C) International Business Machines Corp., 2002,2005
|
* Copyright (C) International Business Machines Corp., 2002,2007
|
||||||
* Author(s): Steve French (sfrench@us.ibm.com)
|
* Author(s): Steve French (sfrench@us.ibm.com)
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or modify
|
||||||
|
@@ -401,8 +401,9 @@ static void unix_fill_in_inode(struct inode *tmp_inode,
|
|||||||
tmp_inode->i_data.a_ops = &cifs_addr_ops;
|
tmp_inode->i_data.a_ops = &cifs_addr_ops;
|
||||||
|
|
||||||
if (isNewInode)
|
if (isNewInode)
|
||||||
return; /* No sense invalidating pages for new inode since we
|
return; /* No sense invalidating pages for new inode
|
||||||
have not started caching readahead file data yet */
|
since we have not started caching readahead
|
||||||
|
file data for it yet */
|
||||||
|
|
||||||
if (timespec_equal(&tmp_inode->i_mtime, &local_mtime) &&
|
if (timespec_equal(&tmp_inode->i_mtime, &local_mtime) &&
|
||||||
(local_size == tmp_inode->i_size)) {
|
(local_size == tmp_inode->i_size)) {
|
||||||
@@ -583,7 +584,8 @@ static int cifs_entry_is_dot(char *current_entry, struct cifsFileInfo *cfile)
|
|||||||
filename = &pFindData->FileName[0];
|
filename = &pFindData->FileName[0];
|
||||||
len = pFindData->FileNameLength;
|
len = pFindData->FileNameLength;
|
||||||
} else {
|
} else {
|
||||||
cFYI(1,("Unknown findfirst level %d",cfile->srch_inf.info_level));
|
cFYI(1, ("Unknown findfirst level %d",
|
||||||
|
cfile->srch_inf.info_level));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (filename) {
|
if (filename) {
|
||||||
@@ -681,7 +683,8 @@ static int find_cifs_entry(const int xid, struct cifsTconInfo *pTcon,
|
|||||||
}
|
}
|
||||||
rc = initiate_cifs_search(xid,file);
|
rc = initiate_cifs_search(xid,file);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
cFYI(1,("error %d reinitiating a search on rewind",rc));
|
cFYI(1, ("error %d reinitiating a search on rewind",
|
||||||
|
rc));
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -728,7 +731,7 @@ static int find_cifs_entry(const int xid, struct cifsTconInfo *pTcon,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (pos_in_buf >= cifsFile->srch_inf.entries_in_buffer) {
|
if (pos_in_buf >= cifsFile->srch_inf.entries_in_buffer) {
|
||||||
cFYI(1,("can not return entries pos_in_buf beyond last entry"));
|
cFYI(1, ("can not return entries pos_in_buf beyond last"));
|
||||||
*num_to_ret = 0;
|
*num_to_ret = 0;
|
||||||
} else
|
} else
|
||||||
*num_to_ret = cifsFile->srch_inf.entries_in_buffer - pos_in_buf;
|
*num_to_ret = cifsFile->srch_inf.entries_in_buffer - pos_in_buf;
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* SMB/CIFS session setup handling routines
|
* SMB/CIFS session setup handling routines
|
||||||
*
|
*
|
||||||
* Copyright (c) International Business Machines Corp., 2006
|
* Copyright (c) International Business Machines Corp., 2006, 2007
|
||||||
* Author(s): Steve French (sfrench@us.ibm.com)
|
* Author(s): Steve French (sfrench@us.ibm.com)
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or modify
|
||||||
@@ -51,7 +51,8 @@ static __u32 cifs_ssetup_hdr(struct cifsSesInfo *ses, SESSION_SETUP_ANDX *pSMB)
|
|||||||
capabilities = CAP_LARGE_FILES | CAP_NT_SMBS | CAP_LEVEL_II_OPLOCKS |
|
capabilities = CAP_LARGE_FILES | CAP_NT_SMBS | CAP_LEVEL_II_OPLOCKS |
|
||||||
CAP_LARGE_WRITE_X | CAP_LARGE_READ_X;
|
CAP_LARGE_WRITE_X | CAP_LARGE_READ_X;
|
||||||
|
|
||||||
if(ses->server->secMode & (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED))
|
if (ses->server->secMode &
|
||||||
|
(SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED))
|
||||||
pSMB->req.hdr.Flags2 |= SMBFLG2_SECURITY_SIGNATURE;
|
pSMB->req.hdr.Flags2 |= SMBFLG2_SECURITY_SIGNATURE;
|
||||||
|
|
||||||
if (ses->capabilities & CAP_UNICODE) {
|
if (ses->capabilities & CAP_UNICODE) {
|
||||||
@@ -170,7 +171,8 @@ static void ascii_ssetup_strings(char ** pbcc_area, struct cifsSesInfo *ses,
|
|||||||
*pbcc_area = bcc_ptr;
|
*pbcc_area = bcc_ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int decode_unicode_ssetup(char ** pbcc_area, int bleft, struct cifsSesInfo *ses,
|
static int decode_unicode_ssetup(char **pbcc_area, int bleft,
|
||||||
|
struct cifsSesInfo *ses,
|
||||||
const struct nls_table *nls_cp)
|
const struct nls_table *nls_cp)
|
||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
@@ -255,7 +257,8 @@ static int decode_unicode_ssetup(char ** pbcc_area, int bleft, struct cifsSesInf
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int decode_ascii_ssetup(char ** pbcc_area, int bleft, struct cifsSesInfo *ses,
|
static int decode_ascii_ssetup(char **pbcc_area, int bleft,
|
||||||
|
struct cifsSesInfo *ses,
|
||||||
const struct nls_table *nls_cp)
|
const struct nls_table *nls_cp)
|
||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
@@ -347,7 +350,7 @@ CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, int first_time,
|
|||||||
} else if ((type == NTLM) || (type == NTLMv2)) {
|
} else if ((type == NTLM) || (type == NTLMv2)) {
|
||||||
/* For NTLMv2 failures eventually may need to retry NTLM */
|
/* For NTLMv2 failures eventually may need to retry NTLM */
|
||||||
wct = 13; /* old style NTLM sessionsetup */
|
wct = 13; /* old style NTLM sessionsetup */
|
||||||
} else /* same size for negotiate or auth, NTLMSSP or extended security */
|
} else /* same size: negotiate or auth, NTLMSSP or extended security */
|
||||||
wct = 12;
|
wct = 12;
|
||||||
|
|
||||||
rc = small_smb_init_no_tc(SMB_COM_SESSION_SETUP_ANDX, wct, ses,
|
rc = small_smb_init_no_tc(SMB_COM_SESSION_SETUP_ANDX, wct, ses,
|
||||||
|
@@ -97,7 +97,7 @@ _my_wcslen(__u16 * str)
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
_my_mbstowcs(__u16 * dst, const unsigned char *src, int len)
|
_my_mbstowcs(__u16 * dst, const unsigned char *src, int len)
|
||||||
{ /* not a very good conversion routine - change/fix */
|
{ /* BB not a very good conversion routine - change/fix */
|
||||||
int i;
|
int i;
|
||||||
__u16 val;
|
__u16 val;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user