diff options
author | Marcin Slusarz <marcin.slusarz@gmail.com> | 2008-04-17 10:38:59 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2008-04-17 10:38:59 -0400 |
commit | e8546d0615542684ca02ba03edebec1a503beb6b (patch) | |
tree | c0114f0e86278dd1418f5a548b38d5d1c4b157b3 /fs/ext4/balloc.c | |
parent | 9a0762c5af40e4aa64fef999967459c98e6ae4c9 (diff) | |
download | linux-e8546d0615542684ca02ba03edebec1a503beb6b.tar.gz linux-e8546d0615542684ca02ba03edebec1a503beb6b.tar.bz2 linux-e8546d0615542684ca02ba03edebec1a503beb6b.zip |
ext4: le*_add_cpu conversion
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);
generated with semantic patch
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: linux-ext4@vger.kernel.org
Cc: sct@redhat.com
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: adilger@clusterfs.com
Cc: Mingming Cao <cmm@us.ibm.com>
Diffstat (limited to 'fs/ext4/balloc.c')
-rw-r--r-- | fs/ext4/balloc.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c index 0737e05ba3dd..5d348998ff38 100644 --- a/fs/ext4/balloc.c +++ b/fs/ext4/balloc.c @@ -752,9 +752,7 @@ do_more: jbd_unlock_bh_state(bitmap_bh); spin_lock(sb_bgl_lock(sbi, block_group)); - desc->bg_free_blocks_count = - cpu_to_le16(le16_to_cpu(desc->bg_free_blocks_count) + - group_freed); + le16_add_cpu(&desc->bg_free_blocks_count, group_freed); desc->bg_checksum = ext4_group_desc_csum(sbi, block_group, desc); spin_unlock(sb_bgl_lock(sbi, block_group)); percpu_counter_add(&sbi->s_freeblocks_counter, count); @@ -1823,8 +1821,7 @@ allocated: spin_lock(sb_bgl_lock(sbi, group_no)); if (gdp->bg_flags & cpu_to_le16(EXT4_BG_BLOCK_UNINIT)) gdp->bg_flags &= cpu_to_le16(~EXT4_BG_BLOCK_UNINIT); - gdp->bg_free_blocks_count = - cpu_to_le16(le16_to_cpu(gdp->bg_free_blocks_count)-num); + le16_add_cpu(&gdp->bg_free_blocks_count, -num); gdp->bg_checksum = ext4_group_desc_csum(sbi, group_no, gdp); spin_unlock(sb_bgl_lock(sbi, group_no)); percpu_counter_sub(&sbi->s_freeblocks_counter, num); |