[CIFS] whitespace cleanup

More than halfway there

Signed-off-by: Steve French <sfrench@us.ibm.com>
This commit is contained in:
Steve French 2007-07-10 01:16:18 +00:00
parent b609f06ac4
commit fb8c4b14d9
12 changed files with 610 additions and 591 deletions

View File

@ -186,11 +186,11 @@ cifs_reconnect(struct TCP_Server_Info *server)
spin_unlock(&GlobalMid_Lock);
up(&server->tcpSem);
while ( (!kthread_should_stop()) && (server->tcpStatus != CifsGood))
{
while ( (!kthread_should_stop()) && (server->tcpStatus != CifsGood)) {
try_to_freeze();
if (server->protocolType == IPV6) {
rc = ipv6_connect(&server->addr.sockAddr6,&server->ssocket);
rc = ipv6_connect(&server->addr.sockAddr6,
&server->ssocket);
} else {
rc = ipv4_connect(&server->addr.sockAddr,
&server->ssocket,

View File

@ -40,8 +40,8 @@ static struct dentry *cifs_get_parent(struct dentry *dentry)
struct export_operations cifs_export_ops = {
.get_parent = cifs_get_parent,
/* Following five export operations are unneeded so far and can default */
/* .get_dentry =
/* Following five export operations are unneeded so far and can default:
.get_dentry =
.get_name =
.find_exported_dentry =
.decode_fh =

View File

@ -3,7 +3,7 @@
*
* vfs operations that deal with files
*
* Copyright (C) International Business Machines Corp., 2002,2003
* Copyright (C) International Business Machines Corp., 2002,2007
* Author(s): Steve French (sfrench@us.ibm.com)
* Jeremy Allison (jra@samba.org)
*
@ -554,7 +554,8 @@ int cifs_closedir(struct inode *inode, struct file *file)
if (pCFileStruct) {
struct cifsTconInfo *pTcon;
struct cifs_sb_info *cifs_sb = CIFS_SB(file->f_path.dentry->d_sb);
struct cifs_sb_info *cifs_sb =
CIFS_SB(file->f_path.dentry->d_sb);
pTcon = cifs_sb->tcon;
@ -594,7 +595,8 @@ int cifs_closedir(struct inode *inode, struct file *file)
static int store_file_lock(struct cifsFileInfo *fid, __u64 len,
__u64 offset, __u8 lockType)
{
struct cifsLockInfo *li = kmalloc(sizeof(struct cifsLockInfo), GFP_KERNEL);
struct cifsLockInfo *li =
kmalloc(sizeof(struct cifsLockInfo), GFP_KERNEL);
if (li == NULL)
return -ENOMEM;
li->offset = offset;
@ -741,10 +743,12 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock)
length, pfLock,
posix_lock_type, wait_flag);
} else {
struct cifsFileInfo *fid = (struct cifsFileInfo *)file->private_data;
struct cifsFileInfo *fid =
(struct cifsFileInfo *)file->private_data;
if (numLock) {
rc = CIFSSMBLock(xid, pTcon, netfid, length, pfLock->fl_start,
rc = CIFSSMBLock(xid, pTcon, netfid, length,
pfLock->fl_start,
0, numLock, lockType, wait_flag);
if (rc == 0) {
@ -763,7 +767,8 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock)
list_for_each_entry_safe(li, tmp, &fid->llist, llist) {
if (pfLock->fl_start <= li->offset &&
length >= li->length) {
stored_rc = CIFSSMBLock(xid, pTcon, netfid,
stored_rc = CIFSSMBLock(xid, pTcon,
netfid,
li->length, li->offset,
1, 0, li->type, FALSE);
if (stored_rc)

View File

@ -471,7 +471,8 @@ int cifs_get_inode_info(struct inode **pinode,
/* new inode, can safely set these fields */
inode->i_mode = cifs_sb->mnt_file_mode;
else /* since we set the inode type below we need to mask off
to avoid strange results if type changes and both get orred in */
to avoid strange results if type changes and both
get orred in */
inode->i_mode &= ~S_IFMT;
/* if (attr & ATTR_REPARSE) */
/* We no longer handle these as symlinks because we could not
@ -849,8 +850,9 @@ static void posix_fill_in_inode(struct inode *tmp_inode,
tmp_inode->i_data.a_ops = &cifs_addr_ops;
if (isNewInode)
return; /* No sense invalidating pages for new inode since we
have not started caching readahead file data yet */
return; /* No sense invalidating pages for new inode
since we we have not started caching
readahead file data yet */
if (timespec_equal(&tmp_inode->i_mtime, &local_mtime) &&
(local_size == tmp_inode->i_size)) {
@ -920,7 +922,8 @@ int cifs_mkdir(struct inode *inode, struct dentry *direntry, int mode)
int obj_type;
if (pInfo->Type == -1) /* no return info - go query */
goto mkdir_get_info;
/*BB check (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID ) to see if need to set uid/gid */
/*BB check (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID ) to see if need
to set uid/gid */
inc_nlink(inode);
if (pTcon->nocase)
direntry->d_op = &cifs_ci_dentry_ops;

View File

@ -3,7 +3,7 @@
*
* vfs operations that deal with io control
*
* Copyright (C) International Business Machines Corp., 2005
* Copyright (C) International Business Machines Corp., 2005,2007
* Author(s): Steve French (sfrench@us.ibm.com)
*
* This library is free software; you can redistribute it and/or modify

View File

@ -129,7 +129,8 @@ cifs_follow_link(struct dentry *direntry, struct nameidata *nd)
goto out;
}
/* BB add read reparse point symlink code and Unix extensions symlink code here BB */
/* BB add read reparse point symlink code and Unix extensions
symlink code here BB */
if (pTcon->ses->capabilities & CAP_UNIX)
rc = CIFSSMBUnixQuerySymLink(xid, pTcon, full_path,
target_path,
@ -189,7 +190,8 @@ cifs_symlink(struct inode *inode, struct dentry *direntry, const char *symname)
rc = CIFSUnixCreateSymLink(xid, pTcon, full_path, symname,
cifs_sb->local_nls);
/* else
rc = CIFSCreateReparseSymLink(xid, pTcon, fromName, toName,cifs_sb_target->local_nls); */
rc = CIFSCreateReparseSymLink(xid, pTcon, fromName, toName,
cifs_sb_target->local_nls); */
if (rc == 0) {
if (pTcon->ses->capabilities & CAP_UNIX)
@ -262,7 +264,8 @@ cifs_readlink(struct dentry *direntry, char __user *pBuffer, int buflen)
return -ENOMEM;
}
/* BB add read reparse point symlink code and Unix extensions symlink code here BB */
/* BB add read reparse point symlink code and
Unix extensions symlink code here BB */
if (cifs_sb->tcon->ses->capabilities & CAP_UNIX)
rc = CIFSSMBUnixQuerySymLink(xid, pTcon, full_path,
tmpbuffer,
@ -293,18 +296,23 @@ cifs_readlink(struct dentry *direntry, char __user *pBuffer, int buflen)
kmalloc(MAX_TREE_SIZE + MAX_PATHCONF + 1,
GFP_KERNEL);
if (tmp_path) {
strncpy(tmp_path, pTcon->treeName, MAX_TREE_SIZE);
strncat(tmp_path, full_path, MAX_PATHCONF);
rc = get_dfs_path(xid, pTcon->ses, tmp_path,
strncpy(tmp_path, pTcon->treeName,
MAX_TREE_SIZE);
strncat(tmp_path, full_path,
MAX_PATHCONF);
rc = get_dfs_path(xid, pTcon->ses,
tmp_path,
cifs_sb->local_nls,
&num_referrals, &referrals,
cifs_sb->mnt_cifs_flags &
CIFS_MOUNT_MAP_SPECIAL_CHR);
cFYI(1,("Get DFS for %s rc = %d ",tmp_path, rc));
cFYI(1, ("Get DFS for %s rc = %d ",
tmp_path, rc));
if ((num_referrals == 0) && (rc == 0))
rc = -EACCES;
else {
cFYI(1,("num referral: %d",num_referrals));
cFYI(1, ("num referral: %d",
num_referrals));
if (referrals) {
cFYI(1,("referral string: %s", referrals));
strncpy(tmpbuffer, referrals, len-1);
@ -313,8 +321,9 @@ cifs_readlink(struct dentry *direntry, char __user *pBuffer, int buflen)
kfree(referrals);
kfree(tmp_path);
}
/* BB add code like else decode referrals then memcpy to
tmpbuffer and free referrals string array BB */
/* BB add code like else decode referrals
then memcpy to tmpbuffer and free referrals
string array BB */
}
}
}

View File

@ -362,7 +362,7 @@ header_assemble(struct smb_hdr *buffer, char smb_command /* command */ ,
break;
} else {
/* BB eventually call cifs_setup_session here */
cFYI(1,("local UID found but smb sess with this server does not exist"));
cFYI(1, ("local UID found but no smb sess with this server exists"));
}
}
}
@ -399,7 +399,7 @@ checkSMBhdr(struct smb_hdr *smb, __u16 mid)
if (smb->Command == SMB_COM_LOCKING_ANDX)
return 0;
else
cERROR(1, ("Rcvd Request not response"));
cERROR(1, ("Received Request not response"));
}
} else { /* bad signature or mid */
if (*(__le32 *) smb->Protocol != cpu_to_le32(0x424d53ff))
@ -521,7 +521,8 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv)
return TRUE;
}
if (pSMBr->hdr.Status.CifsError) {
cFYI(1,("notify err 0x%d",pSMBr->hdr.Status.CifsError));
cFYI(1, ("notify err 0x%d",
pSMBr->hdr.Status.CifsError));
return TRUE;
}
return FALSE;
@ -547,7 +548,8 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv)
if (pSMB->hdr.WordCount != 8)
return FALSE;
cFYI(1,(" oplock type 0x%d level 0x%d",pSMB->LockType,pSMB->OplockLevel));
cFYI(1, ("oplock type 0x%d level 0x%d",
pSMB->LockType, pSMB->OplockLevel));
if (!(pSMB->LockType & LOCKING_ANDX_OPLOCK_RELEASE))
return FALSE;