diff options
author | Marcin Slusarz <marcin.slusarz@gmail.com> | 2008-02-08 07:20:13 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-08 12:22:32 -0500 |
commit | 50e8a2890ed0eeb7a11ae0c39144fcdd1cad1cf8 (patch) | |
tree | b02bee4f8cf2bc16b63596e9c6a316bb91dfb58a /fs/ext3/balloc.c | |
parent | 8b5f6883683c91ad7e1af32b7ceeb604d68e2865 (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/balloc.c')
-rw-r--r-- | fs/ext3/balloc.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/ext3/balloc.c b/fs/ext3/balloc.c index a75713031105..da0cb2c0e437 100644 --- a/fs/ext3/balloc.c +++ b/fs/ext3/balloc.c | |||
@@ -630,9 +630,7 @@ do_more: | |||
630 | jbd_unlock_bh_state(bitmap_bh); | 630 | jbd_unlock_bh_state(bitmap_bh); |
631 | 631 | ||
632 | spin_lock(sb_bgl_lock(sbi, block_group)); | 632 | spin_lock(sb_bgl_lock(sbi, block_group)); |
633 | desc->bg_free_blocks_count = | 633 | le16_add_cpu(&desc->bg_free_blocks_count, group_freed); |
634 | cpu_to_le16(le16_to_cpu(desc->bg_free_blocks_count) + | ||
635 | group_freed); | ||
636 | spin_unlock(sb_bgl_lock(sbi, block_group)); | 634 | spin_unlock(sb_bgl_lock(sbi, block_group)); |
637 | percpu_counter_add(&sbi->s_freeblocks_counter, count); | 635 | percpu_counter_add(&sbi->s_freeblocks_counter, count); |
638 | 636 | ||
@@ -1696,8 +1694,7 @@ allocated: | |||
1696 | ret_block, goal_hits, goal_attempts); | 1694 | ret_block, goal_hits, goal_attempts); |
1697 | 1695 | ||
1698 | spin_lock(sb_bgl_lock(sbi, group_no)); | 1696 | spin_lock(sb_bgl_lock(sbi, group_no)); |
1699 | gdp->bg_free_blocks_count = | 1697 | le16_add_cpu(&gdp->bg_free_blocks_count, -num); |
1700 | cpu_to_le16(le16_to_cpu(gdp->bg_free_blocks_count)-num); | ||
1701 | spin_unlock(sb_bgl_lock(sbi, group_no)); | 1698 | spin_unlock(sb_bgl_lock(sbi, group_no)); |
1702 | percpu_counter_sub(&sbi->s_freeblocks_counter, num); | 1699 | percpu_counter_sub(&sbi->s_freeblocks_counter, num); |
1703 | 1700 | ||