Commit 9fd9784c91db79e953ea3fe3741f885bdc390a72
Committed by
Theodore Ts'o
1 parent
fdff73f094
Exists in
master
and in
7 other branches
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: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Showing 3 changed files with 5 additions and 5 deletions Side-by-side Diff
fs/ext4/balloc.c
... | ... | @@ -684,15 +684,15 @@ |
684 | 684 | gdp = ext4_get_group_desc(sb, i, NULL); |
685 | 685 | if (!gdp) |
686 | 686 | continue; |
687 | - desc_count += le16_to_cpu(gdp->bg_free_blocks_count); | |
687 | + desc_count += ext4_free_blks_count(sb, gdp); | |
688 | 688 | brelse(bitmap_bh); |
689 | 689 | bitmap_bh = ext4_read_block_bitmap(sb, i); |
690 | 690 | if (bitmap_bh == NULL) |
691 | 691 | continue; |
692 | 692 | |
693 | 693 | x = ext4_count_free(bitmap_bh, sb->s_blocksize); |
694 | - printk(KERN_DEBUG "group %lu: stored = %d, counted = %u\n", | |
695 | - i, le16_to_cpu(gdp->bg_free_blocks_count), x); | |
694 | + printk(KERN_DEBUG "group %u: stored = %d, counted = %u\n", | |
695 | + i, ext4_free_blks_count(sb, gdp), x); | |
696 | 696 | bitmap_count += x; |
697 | 697 | } |
698 | 698 | brelse(bitmap_bh); |
fs/ext4/extents.c
... | ... | @@ -3048,7 +3048,7 @@ |
3048 | 3048 | WARN_ON(ret <= 0); |
3049 | 3049 | printk(KERN_ERR "%s: ext4_ext_get_blocks " |
3050 | 3050 | "returned error inode#%lu, block=%u, " |
3051 | - "max_blocks=%lu", __func__, | |
3051 | + "max_blocks=%u", __func__, | |
3052 | 3052 | inode->i_ino, block, max_blocks); |
3053 | 3053 | #endif |
3054 | 3054 | ext4_mark_inode_dirty(handle, inode); |
fs/ext4/mballoc.c
... | ... | @@ -3025,7 +3025,7 @@ |
3025 | 3025 | goto out_err; |
3026 | 3026 | |
3027 | 3027 | ext4_debug("using block group %u(%d)\n", ac->ac_b_ex.fe_group, |
3028 | - gdp->bg_free_blocks_count); | |
3028 | + ext4_free_blks_count(sb, gdp)); | |
3029 | 3029 | |
3030 | 3030 | err = ext4_journal_get_write_access(handle, gdp_bh); |
3031 | 3031 | if (err) |