diff options
author | Andrew Morton <akpm@osdl.org> | 2006-10-11 04:21:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-11 14:14:19 -0400 |
commit | 63f5793351d821749979e36889f9c089c6028c83 (patch) | |
tree | 654a9e600891ccf0c70c0bbbc0a15a52743ff90e | |
parent | ceea16bf85fb46035dda1db263ca29b0e07e22ba (diff) |
[PATCH] ext4 whitespace cleanups
Someone's tab key is emitting spaces. Attempt to repair some of the damage.
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | fs/ext4/acl.c | 4 | ||||
-rw-r--r-- | fs/ext4/dir.c | 7 | ||||
-rw-r--r-- | fs/ext4/extents.c | 14 | ||||
-rw-r--r-- | fs/ext4/namei.c | 52 | ||||
-rw-r--r-- | fs/ext4/super.c | 14 |
5 files changed, 46 insertions, 45 deletions
diff --git a/fs/ext4/acl.c b/fs/ext4/acl.c index 0a965dd5664e..9e882546d91a 100644 --- a/fs/ext4/acl.c +++ b/fs/ext4/acl.c | |||
@@ -141,7 +141,7 @@ ext4_iget_acl(struct inode *inode, struct posix_acl **i_acl) | |||
141 | 141 | ||
142 | static inline void | 142 | static inline void |
143 | ext4_iset_acl(struct inode *inode, struct posix_acl **i_acl, | 143 | ext4_iset_acl(struct inode *inode, struct posix_acl **i_acl, |
144 | struct posix_acl *acl) | 144 | struct posix_acl *acl) |
145 | { | 145 | { |
146 | spin_lock(&inode->i_lock); | 146 | spin_lock(&inode->i_lock); |
147 | if (*i_acl != EXT4_ACL_NOT_CACHED) | 147 | if (*i_acl != EXT4_ACL_NOT_CACHED) |
@@ -375,7 +375,7 @@ int | |||
375 | ext4_acl_chmod(struct inode *inode) | 375 | ext4_acl_chmod(struct inode *inode) |
376 | { | 376 | { |
377 | struct posix_acl *acl, *clone; | 377 | struct posix_acl *acl, *clone; |
378 | int error; | 378 | int error; |
379 | 379 | ||
380 | if (S_ISLNK(inode->i_mode)) | 380 | if (S_ISLNK(inode->i_mode)) |
381 | return -EOPNOTSUPP; | 381 | return -EOPNOTSUPP; |
diff --git a/fs/ext4/dir.c b/fs/ext4/dir.c index 18ac173af575..f8595787a70e 100644 --- a/fs/ext4/dir.c +++ b/fs/ext4/dir.c | |||
@@ -188,8 +188,9 @@ revalidate: | |||
188 | de = (struct ext4_dir_entry_2 *) (bh->b_data + offset); | 188 | de = (struct ext4_dir_entry_2 *) (bh->b_data + offset); |
189 | if (!ext4_check_dir_entry ("ext4_readdir", inode, de, | 189 | if (!ext4_check_dir_entry ("ext4_readdir", inode, de, |
190 | bh, offset)) { | 190 | bh, offset)) { |
191 | /* On error, skip the f_pos to the | 191 | /* |
192 | next block. */ | 192 | * On error, skip the f_pos to the next block |
193 | */ | ||
193 | filp->f_pos = (filp->f_pos | | 194 | filp->f_pos = (filp->f_pos | |
194 | (sb->s_blocksize - 1)) + 1; | 195 | (sb->s_blocksize - 1)) + 1; |
195 | brelse (bh); | 196 | brelse (bh); |
@@ -508,7 +509,7 @@ finished: | |||
508 | 509 | ||
509 | static int ext4_release_dir (struct inode * inode, struct file * filp) | 510 | static int ext4_release_dir (struct inode * inode, struct file * filp) |
510 | { | 511 | { |
511 | if (filp->private_data) | 512 | if (filp->private_data) |
512 | ext4_htree_free_dir_info(filp->private_data); | 513 | ext4_htree_free_dir_info(filp->private_data); |
513 | 514 | ||
514 | return 0; | 515 | return 0; |
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 926186a787a8..2608dce18f3e 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c | |||
@@ -1014,7 +1014,7 @@ ext4_ext_next_allocated_block(struct ext4_ext_path *path) | |||
1014 | * returns first allocated block from next leaf or EXT_MAX_BLOCK | 1014 | * returns first allocated block from next leaf or EXT_MAX_BLOCK |
1015 | */ | 1015 | */ |
1016 | static unsigned ext4_ext_next_leaf_block(struct inode *inode, | 1016 | static unsigned ext4_ext_next_leaf_block(struct inode *inode, |
1017 | struct ext4_ext_path *path) | 1017 | struct ext4_ext_path *path) |
1018 | { | 1018 | { |
1019 | int depth; | 1019 | int depth; |
1020 | 1020 | ||
@@ -1097,8 +1097,8 @@ static int inline | |||
1097 | ext4_can_extents_be_merged(struct inode *inode, struct ext4_extent *ex1, | 1097 | ext4_can_extents_be_merged(struct inode *inode, struct ext4_extent *ex1, |
1098 | struct ext4_extent *ex2) | 1098 | struct ext4_extent *ex2) |
1099 | { | 1099 | { |
1100 | if (le32_to_cpu(ex1->ee_block) + le16_to_cpu(ex1->ee_len) | 1100 | if (le32_to_cpu(ex1->ee_block) + le16_to_cpu(ex1->ee_len) != |
1101 | != le32_to_cpu(ex2->ee_block)) | 1101 | le32_to_cpu(ex2->ee_block)) |
1102 | return 0; | 1102 | return 0; |
1103 | 1103 | ||
1104 | /* | 1104 | /* |
@@ -1113,7 +1113,7 @@ ext4_can_extents_be_merged(struct inode *inode, struct ext4_extent *ex1, | |||
1113 | return 0; | 1113 | return 0; |
1114 | #endif | 1114 | #endif |
1115 | 1115 | ||
1116 | if (ext_pblock(ex1) + le16_to_cpu(ex1->ee_len) == ext_pblock(ex2)) | 1116 | if (ext_pblock(ex1) + le16_to_cpu(ex1->ee_len) == ext_pblock(ex2)) |
1117 | return 1; | 1117 | return 1; |
1118 | return 0; | 1118 | return 0; |
1119 | } | 1119 | } |
@@ -2008,9 +2008,9 @@ int ext4_ext_get_blocks(handle_t *handle, struct inode *inode, | |||
2008 | goto out2; | 2008 | goto out2; |
2009 | } | 2009 | } |
2010 | /* | 2010 | /* |
2011 | * Okay, we need to do block allocation. Lazily initialize the block | 2011 | * Okay, we need to do block allocation. Lazily initialize the block |
2012 | * allocation info here if necessary. | 2012 | * allocation info here if necessary. |
2013 | */ | 2013 | */ |
2014 | if (S_ISREG(inode->i_mode) && (!EXT4_I(inode)->i_block_alloc_info)) | 2014 | if (S_ISREG(inode->i_mode) && (!EXT4_I(inode)->i_block_alloc_info)) |
2015 | ext4_init_block_alloc_info(inode); | 2015 | ext4_init_block_alloc_info(inode); |
2016 | 2016 | ||
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index f98b9994e36c..8b1bd03d20f5 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c | |||
@@ -241,13 +241,13 @@ static inline unsigned dx_node_limit (struct inode *dir) | |||
241 | #ifdef DX_DEBUG | 241 | #ifdef DX_DEBUG |
242 | static void dx_show_index (char * label, struct dx_entry *entries) | 242 | static void dx_show_index (char * label, struct dx_entry *entries) |
243 | { | 243 | { |
244 | int i, n = dx_get_count (entries); | 244 | int i, n = dx_get_count (entries); |
245 | printk("%s index ", label); | 245 | printk("%s index ", label); |
246 | for (i = 0; i < n; i++) | 246 | for (i = 0; i < n; i++) { |
247 | { | 247 | printk("%x->%u ", i? dx_get_hash(entries + i) : |
248 | printk("%x->%u ", i? dx_get_hash(entries + i): 0, dx_get_block(entries + i)); | 248 | 0, dx_get_block(entries + i)); |
249 | } | 249 | } |
250 | printk("\n"); | 250 | printk("\n"); |
251 | } | 251 | } |
252 | 252 | ||
253 | struct stats | 253 | struct stats |
@@ -688,28 +688,26 @@ static int dx_make_map (struct ext4_dir_entry_2 *de, int size, | |||
688 | 688 | ||
689 | static void dx_sort_map (struct dx_map_entry *map, unsigned count) | 689 | static void dx_sort_map (struct dx_map_entry *map, unsigned count) |
690 | { | 690 | { |
691 | struct dx_map_entry *p, *q, *top = map + count - 1; | 691 | struct dx_map_entry *p, *q, *top = map + count - 1; |
692 | int more; | 692 | int more; |
693 | /* Combsort until bubble sort doesn't suck */ | 693 | /* Combsort until bubble sort doesn't suck */ |
694 | while (count > 2) | 694 | while (count > 2) { |
695 | { | 695 | count = count*10/13; |
696 | count = count*10/13; | 696 | if (count - 9 < 2) /* 9, 10 -> 11 */ |
697 | if (count - 9 < 2) /* 9, 10 -> 11 */ | 697 | count = 11; |
698 | count = 11; | 698 | for (p = top, q = p - count; q >= map; p--, q--) |
699 | for (p = top, q = p - count; q >= map; p--, q--) | 699 | if (p->hash < q->hash) |
700 | if (p->hash < q->hash) | 700 | swap(*p, *q); |
701 | swap(*p, *q); | 701 | } |
702 | } | 702 | /* Garden variety bubble sort */ |
703 | /* Garden variety bubble sort */ | 703 | do { |
704 | do { | 704 | more = 0; |
705 | more = 0; | 705 | q = top; |
706 | q = top; | 706 | while (q-- > map) { |
707 | while (q-- > map) | 707 | if (q[1].hash >= q[0].hash) |
708 | { | ||
709 | if (q[1].hash >= q[0].hash) | ||
710 | continue; | 708 | continue; |
711 | swap(*(q+1), *q); | 709 | swap(*(q+1), *q); |
712 | more = 1; | 710 | more = 1; |
713 | } | 711 | } |
714 | } while(more); | 712 | } while(more); |
715 | } | 713 | } |
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 1fa3bdc3c671..b4b022aa2bc2 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -1191,9 +1191,10 @@ static int ext4_setup_super(struct super_block *sb, struct ext4_super_block *es, | |||
1191 | "running e2fsck is recommended\n"); | 1191 | "running e2fsck is recommended\n"); |
1192 | #if 0 | 1192 | #if 0 |
1193 | /* @@@ We _will_ want to clear the valid bit if we find | 1193 | /* @@@ We _will_ want to clear the valid bit if we find |
1194 | inconsistencies, to force a fsck at reboot. But for | 1194 | * inconsistencies, to force a fsck at reboot. But for |
1195 | a plain journaled filesystem we can keep it set as | 1195 | * a plain journaled filesystem we can keep it set as |
1196 | valid forever! :) */ | 1196 | * valid forever! :) |
1197 | */ | ||
1197 | es->s_state = cpu_to_le16(le16_to_cpu(es->s_state) & ~EXT4_VALID_FS); | 1198 | es->s_state = cpu_to_le16(le16_to_cpu(es->s_state) & ~EXT4_VALID_FS); |
1198 | #endif | 1199 | #endif |
1199 | if (!(__s16) le16_to_cpu(es->s_max_mnt_count)) | 1200 | if (!(__s16) le16_to_cpu(es->s_max_mnt_count)) |
@@ -1791,8 +1792,9 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent) | |||
1791 | switch (test_opt(sb, DATA_FLAGS)) { | 1792 | switch (test_opt(sb, DATA_FLAGS)) { |
1792 | case 0: | 1793 | case 0: |
1793 | /* No mode set, assume a default based on the journal | 1794 | /* No mode set, assume a default based on the journal |
1794 | capabilities: ORDERED_DATA if the journal can | 1795 | * capabilities: ORDERED_DATA if the journal can |
1795 | cope, else JOURNAL_DATA */ | 1796 | * cope, else JOURNAL_DATA |
1797 | */ | ||
1796 | if (jbd2_journal_check_available_features | 1798 | if (jbd2_journal_check_available_features |
1797 | (sbi->s_journal, 0, 0, JBD2_FEATURE_INCOMPAT_REVOKE)) | 1799 | (sbi->s_journal, 0, 0, JBD2_FEATURE_INCOMPAT_REVOKE)) |
1798 | set_opt(sbi->s_mount_opt, ORDERED_DATA); | 1800 | set_opt(sbi->s_mount_opt, ORDERED_DATA); |
@@ -2802,7 +2804,7 @@ static int __init init_ext4_fs(void) | |||
2802 | err = init_inodecache(); | 2804 | err = init_inodecache(); |
2803 | if (err) | 2805 | if (err) |
2804 | goto out1; | 2806 | goto out1; |
2805 | err = register_filesystem(&ext4dev_fs_type); | 2807 | err = register_filesystem(&ext4dev_fs_type); |
2806 | if (err) | 2808 | if (err) |
2807 | goto out; | 2809 | goto out; |
2808 | return 0; | 2810 | return 0; |