aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/resize.c
diff options
context:
space:
mode:
authorLukas Czerner <lczerner@redhat.com>2013-03-02 17:18:58 -0500
committerTheodore Ts'o <tytso@mit.edu>2013-03-02 17:18:58 -0500
commit810da240f221d64bf90020f25941b05b378186fe (patch)
tree9fb624e43c624bf8e38077804ca2f95026c11b53 /fs/ext4/resize.c
parent3e36a16375eee390a9d80f99499fe630efa08128 (diff)
ext4: convert number of blocks to clusters properly
We're using macro EXT4_B2C() to convert number of blocks to number of clusters for bigalloc file systems. However, we should be using EXT4_NUM_B2C(). Signed-off-by: Lukas Czerner <lczerner@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Cc: stable@vger.kernel.org
Diffstat (limited to 'fs/ext4/resize.c')
-rw-r--r--fs/ext4/resize.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index c7f4d7584669..b2c8ee56eb98 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -1247,7 +1247,7 @@ static int ext4_setup_new_descs(handle_t *handle, struct super_block *sb,
1247 1247
1248 ext4_inode_table_set(sb, gdp, group_data->inode_table); 1248 ext4_inode_table_set(sb, gdp, group_data->inode_table);
1249 ext4_free_group_clusters_set(sb, gdp, 1249 ext4_free_group_clusters_set(sb, gdp,
1250 EXT4_B2C(sbi, group_data->free_blocks_count)); 1250 EXT4_NUM_B2C(sbi, group_data->free_blocks_count));
1251 ext4_free_inodes_set(sb, gdp, EXT4_INODES_PER_GROUP(sb)); 1251 ext4_free_inodes_set(sb, gdp, EXT4_INODES_PER_GROUP(sb));
1252 if (ext4_has_group_desc_csum(sb)) 1252 if (ext4_has_group_desc_csum(sb))
1253 ext4_itable_unused_set(sb, gdp, 1253 ext4_itable_unused_set(sb, gdp,
@@ -1349,7 +1349,7 @@ static void ext4_update_super(struct super_block *sb,
1349 1349
1350 /* Update the free space counts */ 1350 /* Update the free space counts */
1351 percpu_counter_add(&sbi->s_freeclusters_counter, 1351 percpu_counter_add(&sbi->s_freeclusters_counter,
1352 EXT4_B2C(sbi, free_blocks)); 1352 EXT4_NUM_B2C(sbi, free_blocks));
1353 percpu_counter_add(&sbi->s_freeinodes_counter, 1353 percpu_counter_add(&sbi->s_freeinodes_counter,
1354 EXT4_INODES_PER_GROUP(sb) * flex_gd->count); 1354 EXT4_INODES_PER_GROUP(sb) * flex_gd->count);
1355 1355
@@ -1360,7 +1360,7 @@ static void ext4_update_super(struct super_block *sb,
1360 sbi->s_log_groups_per_flex) { 1360 sbi->s_log_groups_per_flex) {
1361 ext4_group_t flex_group; 1361 ext4_group_t flex_group;
1362 flex_group = ext4_flex_group(sbi, group_data[0].group); 1362 flex_group = ext4_flex_group(sbi, group_data[0].group);
1363 atomic_add(EXT4_B2C(sbi, free_blocks), 1363 atomic_add(EXT4_NUM_B2C(sbi, free_blocks),
1364 &sbi->s_flex_groups[flex_group].free_clusters); 1364 &sbi->s_flex_groups[flex_group].free_clusters);
1365 atomic_add(EXT4_INODES_PER_GROUP(sb) * flex_gd->count, 1365 atomic_add(EXT4_INODES_PER_GROUP(sb) * flex_gd->count,
1366 &sbi->s_flex_groups[flex_group].free_inodes); 1366 &sbi->s_flex_groups[flex_group].free_inodes);