From b0973709d182d6f05858d383eb2fdac796fe1b82 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Mon, 19 Jan 2004 05:07:51 -0800 Subject: [PATCH] [PATCH] ext2: fix build when EXT2_DEBUG is set Fix warnings and build errors under EXT2_DEBUG. --- fs/ext2/balloc.c | 6 ++++-- fs/ext2/ialloc.c | 5 ++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c index a34b3801336e4..f5a6b336f708f 100644 --- a/fs/ext2/balloc.c +++ b/fs/ext2/balloc.c @@ -527,7 +527,8 @@ unsigned long ext2_count_free_blocks (struct super_block * sb) int i; #ifdef EXT2FS_DEBUG unsigned long bitmap_count, x; - + struct ext2_super_block *es; + lock_super (sb); es = EXT2_SB(sb)->s_es; desc_count = 0; @@ -550,7 +551,8 @@ unsigned long ext2_count_free_blocks (struct super_block * sb) brelse(bitmap_bh); } printk("ext2_count_free_blocks: stored = %lu, computed = %lu, %lu\n", - le32_to_cpu(es->s_free_blocks_count), desc_count, bitmap_count); + (long)le32_to_cpu(es->s_free_blocks_count), + desc_count, bitmap_count); unlock_super (sb); return bitmap_count; #else diff --git a/fs/ext2/ialloc.c b/fs/ext2/ialloc.c index 95ad61fc80b79..df5eb0b299dd5 100644 --- a/fs/ext2/ialloc.c +++ b/fs/ext2/ialloc.c @@ -638,10 +638,9 @@ unsigned long ext2_count_free_inodes (struct super_block * sb) int i; #ifdef EXT2FS_DEBUG - struct ext2_super_block * es; + struct ext2_super_block *es; unsigned long bitmap_count = 0; struct buffer_head *bitmap_bh = NULL; - int i; lock_super (sb); es = EXT2_SB(sb)->s_es; @@ -658,7 +657,7 @@ unsigned long ext2_count_free_inodes (struct super_block * sb) continue; x = ext2_count_free(bitmap_bh, EXT2_INODES_PER_GROUP(sb) / 8); - printk ("group %d: stored = %d, counted = %lu\n", + printk("group %d: stored = %d, counted = %u\n", i, le16_to_cpu(desc->bg_free_inodes_count), x); bitmap_count += x; } -- 2.53.0