Commit b0973709 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ext2: fix build when EXT2_DEBUG is set

Fix warnings and build errors under EXT2_DEBUG.
parent 79dfabdf
......@@ -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
......
......@@ -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;
}
......
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