Commit 9fd9784c authored by Thadeu Lima de Souza Cascardo's avatar Thadeu Lima de Souza Cascardo Committed by Theodore Ts'o

ext4: Fix building with EXT4FS_DEBUG

When bg_free_blocks_count was renamed to bg_free_blocks_count_lo in
560671a0, its uses under EXT4FS_DEBUG were not changed to the helper
ext4_free_blks_count.

Another commit, 498e5f24, also did not change everything needed under
EXT4FS_DEBUG, thus making it spill some warnings related to printing
format.

This commit fixes both issues and makes ext4 build again when
EXT4FS_DEBUG is enabled.
Signed-off-by: default avatarThadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
parent fdff73f0
...@@ -684,15 +684,15 @@ ext4_fsblk_t ext4_count_free_blocks(struct super_block *sb) ...@@ -684,15 +684,15 @@ ext4_fsblk_t ext4_count_free_blocks(struct super_block *sb)
gdp = ext4_get_group_desc(sb, i, NULL); gdp = ext4_get_group_desc(sb, i, NULL);
if (!gdp) if (!gdp)
continue; continue;
desc_count += le16_to_cpu(gdp->bg_free_blocks_count); desc_count += ext4_free_blks_count(sb, gdp);
brelse(bitmap_bh); brelse(bitmap_bh);
bitmap_bh = ext4_read_block_bitmap(sb, i); bitmap_bh = ext4_read_block_bitmap(sb, i);
if (bitmap_bh == NULL) if (bitmap_bh == NULL)
continue; continue;
x = ext4_count_free(bitmap_bh, sb->s_blocksize); x = ext4_count_free(bitmap_bh, sb->s_blocksize);
printk(KERN_DEBUG "group %lu: stored = %d, counted = %u\n", printk(KERN_DEBUG "group %u: stored = %d, counted = %u\n",
i, le16_to_cpu(gdp->bg_free_blocks_count), x); i, ext4_free_blks_count(sb, gdp), x);
bitmap_count += x; bitmap_count += x;
} }
brelse(bitmap_bh); brelse(bitmap_bh);
......
...@@ -3048,7 +3048,7 @@ long ext4_fallocate(struct inode *inode, int mode, loff_t offset, loff_t len) ...@@ -3048,7 +3048,7 @@ long ext4_fallocate(struct inode *inode, int mode, loff_t offset, loff_t len)
WARN_ON(ret <= 0); WARN_ON(ret <= 0);
printk(KERN_ERR "%s: ext4_ext_get_blocks " printk(KERN_ERR "%s: ext4_ext_get_blocks "
"returned error inode#%lu, block=%u, " "returned error inode#%lu, block=%u, "
"max_blocks=%lu", __func__, "max_blocks=%u", __func__,
inode->i_ino, block, max_blocks); inode->i_ino, block, max_blocks);
#endif #endif
ext4_mark_inode_dirty(handle, inode); ext4_mark_inode_dirty(handle, inode);
......
...@@ -3025,7 +3025,7 @@ ext4_mb_mark_diskspace_used(struct ext4_allocation_context *ac, ...@@ -3025,7 +3025,7 @@ ext4_mb_mark_diskspace_used(struct ext4_allocation_context *ac,
goto out_err; goto out_err;
ext4_debug("using block group %u(%d)\n", ac->ac_b_ex.fe_group, ext4_debug("using block group %u(%d)\n", ac->ac_b_ex.fe_group,
gdp->bg_free_blocks_count); ext4_free_blks_count(sb, gdp));
err = ext4_journal_get_write_access(handle, gdp_bh); err = ext4_journal_get_write_access(handle, gdp_bh);
if (err) if (err)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment