aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext3
diff options
context:
space:
mode:
authorGlauber de Oliveira Costa <gocosta@br.ibm.com>2005-09-23 00:44:26 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-23 01:17:37 -0400
commit8bdac5d1ed892da54b6b2069e50a47b3aa39460f (patch)
tree7b141ffd02ccdea86eaad1a6ad0ebfe655f7937a /fs/ext3
parentf65d9bea8692d7343e4636763f291408f025834f (diff)
[PATCH] ext3: EXT3_DEBUG build fixes
Fix some warnings and a build error when EXT3_DEBUG is enabled. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/ext3')
-rw-r--r--fs/ext3/balloc.c6
-rw-r--r--fs/ext3/resize.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/fs/ext3/balloc.c b/fs/ext3/balloc.c
index e463dca008e4..0213db4911a2 100644
--- a/fs/ext3/balloc.c
+++ b/fs/ext3/balloc.c
@@ -1410,7 +1410,7 @@ unsigned long ext3_count_free_blocks(struct super_block *sb)
1410 unsigned long desc_count; 1410 unsigned long desc_count;
1411 struct ext3_group_desc *gdp; 1411 struct ext3_group_desc *gdp;
1412 int i; 1412 int i;
1413 unsigned long ngroups; 1413 unsigned long ngroups = EXT3_SB(sb)->s_groups_count;
1414#ifdef EXT3FS_DEBUG 1414#ifdef EXT3FS_DEBUG
1415 struct ext3_super_block *es; 1415 struct ext3_super_block *es;
1416 unsigned long bitmap_count, x; 1416 unsigned long bitmap_count, x;
@@ -1421,7 +1421,8 @@ unsigned long ext3_count_free_blocks(struct super_block *sb)
1421 desc_count = 0; 1421 desc_count = 0;
1422 bitmap_count = 0; 1422 bitmap_count = 0;
1423 gdp = NULL; 1423 gdp = NULL;
1424 for (i = 0; i < EXT3_SB(sb)->s_groups_count; i++) { 1424
1425 for (i = 0; i < ngroups; i++) {
1425 gdp = ext3_get_group_desc(sb, i, NULL); 1426 gdp = ext3_get_group_desc(sb, i, NULL);
1426 if (!gdp) 1427 if (!gdp)
1427 continue; 1428 continue;
@@ -1443,7 +1444,6 @@ unsigned long ext3_count_free_blocks(struct super_block *sb)
1443 return bitmap_count; 1444 return bitmap_count;
1444#else 1445#else
1445 desc_count = 0; 1446 desc_count = 0;
1446 ngroups = EXT3_SB(sb)->s_groups_count;
1447 smp_rmb(); 1447 smp_rmb();
1448 for (i = 0; i < ngroups; i++) { 1448 for (i = 0; i < ngroups; i++) {
1449 gdp = ext3_get_group_desc(sb, i, NULL); 1449 gdp = ext3_get_group_desc(sb, i, NULL);
diff --git a/fs/ext3/resize.c b/fs/ext3/resize.c
index 2c9f81278d5d..57f79106267d 100644
--- a/fs/ext3/resize.c
+++ b/fs/ext3/resize.c
@@ -242,7 +242,7 @@ static int setup_new_group_blocks(struct super_block *sb,
242 i < sbi->s_itb_per_group; i++, bit++, block++) { 242 i < sbi->s_itb_per_group; i++, bit++, block++) {
243 struct buffer_head *it; 243 struct buffer_head *it;
244 244
245 ext3_debug("clear inode block %#04x (+%ld)\n", block, bit); 245 ext3_debug("clear inode block %#04lx (+%d)\n", block, bit);
246 if (IS_ERR(it = bclean(handle, sb, block))) { 246 if (IS_ERR(it = bclean(handle, sb, block))) {
247 err = PTR_ERR(it); 247 err = PTR_ERR(it);
248 goto exit_bh; 248 goto exit_bh;
@@ -643,8 +643,8 @@ static void update_backups(struct super_block *sb,
643 break; 643 break;
644 644
645 bh = sb_getblk(sb, group * bpg + blk_off); 645 bh = sb_getblk(sb, group * bpg + blk_off);
646 ext3_debug(sb, __FUNCTION__, "update metadata backup %#04lx\n", 646 ext3_debug("update metadata backup %#04lx\n",
647 bh->b_blocknr); 647 (unsigned long)bh->b_blocknr);
648 if ((err = ext3_journal_get_write_access(handle, bh))) 648 if ((err = ext3_journal_get_write_access(handle, bh)))
649 break; 649 break;
650 lock_buffer(bh); 650 lock_buffer(bh);