diff options
Diffstat (limited to 'fs/ext4/mballoc.c')
-rw-r--r-- | fs/ext4/mballoc.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index aaaccf5986f9..4865d318d7e1 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c | |||
@@ -3099,9 +3099,7 @@ ext4_mb_mark_diskspace_used(struct ext4_allocation_context *ac, | |||
3099 | ac->ac_b_ex.fe_group, | 3099 | ac->ac_b_ex.fe_group, |
3100 | gdp)); | 3100 | gdp)); |
3101 | } | 3101 | } |
3102 | gdp->bg_free_blocks_count = | 3102 | le16_add_cpu(&gdp->bg_free_blocks_count, -ac->ac_b_ex.fe_len); |
3103 | cpu_to_le16(le16_to_cpu(gdp->bg_free_blocks_count) | ||
3104 | - ac->ac_b_ex.fe_len); | ||
3105 | gdp->bg_checksum = ext4_group_desc_csum(sbi, ac->ac_b_ex.fe_group, gdp); | 3103 | gdp->bg_checksum = ext4_group_desc_csum(sbi, ac->ac_b_ex.fe_group, gdp); |
3106 | spin_unlock(sb_bgl_lock(sbi, ac->ac_b_ex.fe_group)); | 3104 | spin_unlock(sb_bgl_lock(sbi, ac->ac_b_ex.fe_group)); |
3107 | percpu_counter_sub(&sbi->s_freeblocks_counter, ac->ac_b_ex.fe_len); | 3105 | percpu_counter_sub(&sbi->s_freeblocks_counter, ac->ac_b_ex.fe_len); |
@@ -4593,8 +4591,7 @@ do_more: | |||
4593 | } | 4591 | } |
4594 | 4592 | ||
4595 | spin_lock(sb_bgl_lock(sbi, block_group)); | 4593 | spin_lock(sb_bgl_lock(sbi, block_group)); |
4596 | gdp->bg_free_blocks_count = | 4594 | le16_add_cpu(&gdp->bg_free_blocks_count, count); |
4597 | cpu_to_le16(le16_to_cpu(gdp->bg_free_blocks_count) + count); | ||
4598 | gdp->bg_checksum = ext4_group_desc_csum(sbi, block_group, gdp); | 4595 | gdp->bg_checksum = ext4_group_desc_csum(sbi, block_group, gdp); |
4599 | spin_unlock(sb_bgl_lock(sbi, block_group)); | 4596 | spin_unlock(sb_bgl_lock(sbi, block_group)); |
4600 | percpu_counter_add(&sbi->s_freeblocks_counter, count); | 4597 | percpu_counter_add(&sbi->s_freeblocks_counter, count); |