mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 06:32:08 +00:00
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>
This commit is contained in:
parent
8b5f688368
commit
50e8a2890e
5 changed files with 13 additions and 26 deletions
|
@ -518,8 +518,7 @@ static int add_new_gdb(handle_t *handle, struct inode *inode,
|
|||
EXT3_SB(sb)->s_gdb_count++;
|
||||
kfree(o_group_desc);
|
||||
|
||||
es->s_reserved_gdt_blocks =
|
||||
cpu_to_le16(le16_to_cpu(es->s_reserved_gdt_blocks) - 1);
|
||||
le16_add_cpu(&es->s_reserved_gdt_blocks, -1);
|
||||
ext3_journal_dirty_metadata(handle, EXT3_SB(sb)->s_sbh);
|
||||
|
||||
return 0;
|
||||
|
@ -890,10 +889,8 @@ int ext3_group_add(struct super_block *sb, struct ext3_new_group_data *input)
|
|||
* blocks/inodes before the group is live won't actually let us
|
||||
* allocate the new space yet.
|
||||
*/
|
||||
es->s_blocks_count = cpu_to_le32(le32_to_cpu(es->s_blocks_count) +
|
||||
input->blocks_count);
|
||||
es->s_inodes_count = cpu_to_le32(le32_to_cpu(es->s_inodes_count) +
|
||||
EXT3_INODES_PER_GROUP(sb));
|
||||
le32_add_cpu(&es->s_blocks_count, input->blocks_count);
|
||||
le32_add_cpu(&es->s_inodes_count, EXT3_INODES_PER_GROUP(sb));
|
||||
|
||||
/*
|
||||
* 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)
|
|||
|
||||
/* Update the reserved block counts only once the new group is
|
||||
* active. */
|
||||
es->s_r_blocks_count = cpu_to_le32(le32_to_cpu(es->s_r_blocks_count) +
|
||||
input->reserved_blocks);
|
||||
le32_add_cpu(&es->s_r_blocks_count, input->reserved_blocks);
|
||||
|
||||
/* Update the free space counts */
|
||||
percpu_counter_add(&sbi->s_freeblocks_counter,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue