aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext3/resize.c
diff options
context:
space:
mode:
authorMarcin Slusarz <marcin.slusarz@gmail.com>2008-02-08 07:20:13 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-08 12:22:32 -0500
commit50e8a2890ed0eeb7a11ae0c39144fcdd1cad1cf8 (patch)
treeb02bee4f8cf2bc16b63596e9c6a316bb91dfb58a /fs/ext3/resize.c
parent8b5f6883683c91ad7e1af32b7ceeb604d68e2865 (diff)
ext3: replace all adds to little endians variables with le*_add_cpu
replace all: little_endian_variable = cpu_to_leX(leX_to_cpu(little_endian_variable) + expression_in_cpu_byteorder); with: leX_add_cpu(&little_endian_variable, expression_in_cpu_byteorder); sparse didn't generate any new warning with this patch Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Cc: Mark Fasheh <mark.fasheh@oracle.com> Cc: David Chinner <dgc@sgi.com> Cc: Timothy Shimmin <tes@sgi.com> Cc: <linux-ext4@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ext3/resize.c')
-rw-r--r--fs/ext3/resize.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/fs/ext3/resize.c b/fs/ext3/resize.c
index ebc05af7343a..9397d779c43d 100644
--- a/fs/ext3/resize.c
+++ b/fs/ext3/resize.c
@@ -518,8 +518,7 @@ static int add_new_gdb(handle_t *handle, struct inode *inode,
518 EXT3_SB(sb)->s_gdb_count++; 518 EXT3_SB(sb)->s_gdb_count++;
519 kfree(o_group_desc); 519 kfree(o_group_desc);
520 520
521 es->s_reserved_gdt_blocks = 521 le16_add_cpu(&es->s_reserved_gdt_blocks, -1);
522 cpu_to_le16(le16_to_cpu(es->s_reserved_gdt_blocks) - 1);
523 ext3_journal_dirty_metadata(handle, EXT3_SB(sb)->s_sbh); 522 ext3_journal_dirty_metadata(handle, EXT3_SB(sb)->s_sbh);
524 523
525 return 0; 524 return 0;
@@ -890,10 +889,8 @@ int ext3_group_add(struct super_block *sb, struct ext3_new_group_data *input)
890 * blocks/inodes before the group is live won't actually let us 889 * blocks/inodes before the group is live won't actually let us
891 * allocate the new space yet. 890 * allocate the new space yet.
892 */ 891 */
893 es->s_blocks_count = cpu_to_le32(le32_to_cpu(es->s_blocks_count) + 892 le32_add_cpu(&es->s_blocks_count, input->blocks_count);
894 input->blocks_count); 893 le32_add_cpu(&es->s_inodes_count, EXT3_INODES_PER_GROUP(sb));
895 es->s_inodes_count = cpu_to_le32(le32_to_cpu(es->s_inodes_count) +
896 EXT3_INODES_PER_GROUP(sb));
897 894
898 /* 895 /*
899 * We need to protect s_groups_count against other CPUs seeing 896 * We need to protect s_groups_count against other CPUs seeing
@@ -926,8 +923,7 @@ int ext3_group_add(struct super_block *sb, struct ext3_new_group_data *input)
926 923
927 /* Update the reserved block counts only once the new group is 924 /* Update the reserved block counts only once the new group is
928 * active. */ 925 * active. */
929 es->s_r_blocks_count = cpu_to_le32(le32_to_cpu(es->s_r_blocks_count) + 926 le32_add_cpu(&es->s_r_blocks_count, input->reserved_blocks);
930 input->reserved_blocks);
931 927
932 /* Update the free space counts */ 928 /* Update the free space counts */
933 percpu_counter_add(&sbi->s_freeblocks_counter, 929 percpu_counter_add(&sbi->s_freeblocks_counter,