diff options
author | Steve French <sfrench@us.ibm.com> | 2007-07-12 20:33:32 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2007-07-12 20:33:32 -0400 |
commit | 50c2f75388727018c3c357454a247072915a9e3f (patch) | |
tree | e7c7cd30f1adee51be7af8bda5e937df5c899bc6 /fs/cifs/readdir.c | |
parent | 7521a3c566dda7bb09576975324fc0a08a79ad14 (diff) |
[CIFS] whitespace/formatting fixes
This should be the last big batch of whitespace/formatting fixes.
checkpatch warnings for the cifs directory are down about 90% and
many of the remaining ones are harder to remove or make the code
harder to read.
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/readdir.c')
-rw-r--r-- | fs/cifs/readdir.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c index f519e1910191..07f92531f74f 100644 --- a/fs/cifs/readdir.c +++ b/fs/cifs/readdir.c | |||
@@ -51,7 +51,6 @@ static void dump_cifs_file_struct(struct file *file, char *label) | |||
51 | if (cf->srch_inf.emptyDir) { | 51 | if (cf->srch_inf.emptyDir) { |
52 | cFYI(1, ("empty dir")); | 52 | cFYI(1, ("empty dir")); |
53 | } | 53 | } |
54 | |||
55 | } | 54 | } |
56 | } | 55 | } |
57 | #endif /* DEBUG2 */ | 56 | #endif /* DEBUG2 */ |
@@ -255,7 +254,6 @@ static void fill_in_inode(struct inode *tmp_inode, int new_buf_type, | |||
255 | tmp_inode->i_fop = &cifs_file_direct_nobrl_ops; | 254 | tmp_inode->i_fop = &cifs_file_direct_nobrl_ops; |
256 | else | 255 | else |
257 | tmp_inode->i_fop = &cifs_file_direct_ops; | 256 | tmp_inode->i_fop = &cifs_file_direct_ops; |
258 | |||
259 | } else if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_BRL) | 257 | } else if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_BRL) |
260 | tmp_inode->i_fop = &cifs_file_nobrl_ops; | 258 | tmp_inode->i_fop = &cifs_file_nobrl_ops; |
261 | else | 259 | else |
@@ -644,11 +642,11 @@ static int find_cifs_entry(const int xid, struct cifsTconInfo *pTcon, | |||
644 | loff_t index_to_find = file->f_pos; | 642 | loff_t index_to_find = file->f_pos; |
645 | struct cifsFileInfo *cifsFile = file->private_data; | 643 | struct cifsFileInfo *cifsFile = file->private_data; |
646 | /* check if index in the buffer */ | 644 | /* check if index in the buffer */ |
647 | 645 | ||
648 | if ((cifsFile == NULL) || (ppCurrentEntry == NULL) || | 646 | if ((cifsFile == NULL) || (ppCurrentEntry == NULL) || |
649 | (num_to_ret == NULL)) | 647 | (num_to_ret == NULL)) |
650 | return -ENOENT; | 648 | return -ENOENT; |
651 | 649 | ||
652 | *ppCurrentEntry = NULL; | 650 | *ppCurrentEntry = NULL; |
653 | first_entry_in_buffer = | 651 | first_entry_in_buffer = |
654 | cifsFile->srch_inf.index_of_last_entry - | 652 | cifsFile->srch_inf.index_of_last_entry - |
@@ -712,7 +710,7 @@ static int find_cifs_entry(const int xid, struct cifsTconInfo *pTcon, | |||
712 | pos_in_buf = index_to_find - first_entry_in_buffer; | 710 | pos_in_buf = index_to_find - first_entry_in_buffer; |
713 | cFYI(1, ("found entry - pos_in_buf %d", pos_in_buf)); | 711 | cFYI(1, ("found entry - pos_in_buf %d", pos_in_buf)); |
714 | 712 | ||
715 | for (i=0;(i<(pos_in_buf)) && (current_entry != NULL);i++) { | 713 | for (i=0; (i < (pos_in_buf)) && (current_entry != NULL); i++) { |
716 | /* go entry by entry figuring out which is first */ | 714 | /* go entry by entry figuring out which is first */ |
717 | current_entry = nxt_dir_entry(current_entry, end_of_smb, | 715 | current_entry = nxt_dir_entry(current_entry, end_of_smb, |
718 | cifsFile->srch_inf.info_level); | 716 | cifsFile->srch_inf.info_level); |
@@ -839,7 +837,7 @@ static int cifs_filldir(char *pfindEntry, struct file *file, | |||
839 | return -EINVAL; | 837 | return -EINVAL; |
840 | 838 | ||
841 | pCifsF = file->private_data; | 839 | pCifsF = file->private_data; |
842 | 840 | ||
843 | if ((scratch_buf == NULL) || (pfindEntry == NULL) || (pCifsF == NULL)) | 841 | if ((scratch_buf == NULL) || (pfindEntry == NULL) || (pCifsF == NULL)) |
844 | return -ENOENT; | 842 | return -ENOENT; |
845 | 843 | ||
@@ -892,7 +890,7 @@ static int cifs_filldir(char *pfindEntry, struct file *file, | |||
892 | if (rc == 2) | 890 | if (rc == 2) |
893 | d_rehash(tmp_dentry); | 891 | d_rehash(tmp_dentry); |
894 | } | 892 | } |
895 | 893 | ||
896 | 894 | ||
897 | rc = filldir(direntry, qstring.name, qstring.len, file->f_pos, | 895 | rc = filldir(direntry, qstring.name, qstring.len, file->f_pos, |
898 | tmp_inode->i_ino, obj_type); | 896 | tmp_inode->i_ino, obj_type); |
@@ -951,7 +949,7 @@ static int cifs_save_resume_key(const char *current_entry, | |||
951 | len = le32_to_cpu(pFindData->FileNameLength); | 949 | len = le32_to_cpu(pFindData->FileNameLength); |
952 | cifsFile->srch_inf.resume_key = pFindData->FileIndex; | 950 | cifsFile->srch_inf.resume_key = pFindData->FileIndex; |
953 | } else if (level == SMB_FIND_FILE_BOTH_DIRECTORY_INFO) { | 951 | } else if (level == SMB_FIND_FILE_BOTH_DIRECTORY_INFO) { |
954 | FILE_BOTH_DIRECTORY_INFO *pFindData = | 952 | FILE_BOTH_DIRECTORY_INFO *pFindData = |
955 | (FILE_BOTH_DIRECTORY_INFO *)current_entry; | 953 | (FILE_BOTH_DIRECTORY_INFO *)current_entry; |
956 | filename = &pFindData->FileName[0]; | 954 | filename = &pFindData->FileName[0]; |
957 | len = le32_to_cpu(pFindData->FileNameLength); | 955 | len = le32_to_cpu(pFindData->FileNameLength); |
@@ -982,7 +980,7 @@ int cifs_readdir(struct file *file, void *direntry, filldir_t filldir) | |||
982 | char *current_entry; | 980 | char *current_entry; |
983 | int num_to_fill = 0; | 981 | int num_to_fill = 0; |
984 | char *tmp_buf = NULL; | 982 | char *tmp_buf = NULL; |
985 | char * end_of_smb; | 983 | char *end_of_smb; |
986 | int max_len; | 984 | int max_len; |
987 | 985 | ||
988 | xid = GetXid(); | 986 | xid = GetXid(); |