diff options
| author | Anton Altaparmakov <aia21@cantab.net> | 2005-09-26 10:50:29 +0100 |
|---|---|---|
| committer | Anton Altaparmakov <aia21@cantab.net> | 2005-09-26 10:50:29 +0100 |
| commit | e8c2cd99a3933d93413910bc93cbd5b53177110b (patch) | |
| tree | ea4c1d63b1bdeb9ef1aacacad0ac9c7dc0768fdc /fs/ext3/balloc.c | |
| parent | 5a8c0cc32bb6e029cd9c36f655c6b0955b0d9967 (diff) | |
| parent | 8ddec7460d2f5db3ac35812c03676b1473d1d668 (diff) | |
Merge branch 'master' of /home/src/linux-2.6/
Diffstat (limited to 'fs/ext3/balloc.c')
| -rw-r--r-- | fs/ext3/balloc.c | 6 |
1 files changed, 3 insertions, 3 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) unsigned long desc_count; struct ext3_group_desc *gdp; int i; - unsigned long ngroups; + unsigned long ngroups = EXT3_SB(sb)->s_groups_count; #ifdef EXT3FS_DEBUG struct ext3_super_block *es; unsigned long bitmap_count, x; @@ -1421,7 +1421,8 @@ unsigned long ext3_count_free_blocks(struct super_block *sb) desc_count = 0; bitmap_count = 0; gdp = NULL; - for (i = 0; i < EXT3_SB(sb)->s_groups_count; i++) { + + for (i = 0; i < ngroups; i++) { gdp = ext3_get_group_desc(sb, i, NULL); if (!gdp) continue; @@ -1443,7 +1444,6 @@ unsigned long ext3_count_free_blocks(struct super_block *sb) return bitmap_count; #else desc_count = 0; - ngroups = EXT3_SB(sb)->s_groups_count; smp_rmb(); for (i = 0; i < ngroups; i++) { gdp = ext3_get_group_desc(sb, i, NULL); |
