aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext3/ialloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext3/ialloc.c')
-rw-r--r--fs/ext3/ialloc.c41
1 files changed, 0 insertions, 41 deletions
diff --git a/fs/ext3/ialloc.c b/fs/ext3/ialloc.c
index df3f517c54ac..9e4a24376210 100644
--- a/fs/ext3/ialloc.c
+++ b/fs/ext3/ialloc.c
@@ -756,44 +756,3 @@ unsigned long ext3_count_dirs (struct super_block * sb)
756 return count; 756 return count;
757} 757}
758 758
759#ifdef CONFIG_EXT3_CHECK
760/* Called at mount-time, super-block is locked */
761void ext3_check_inodes_bitmap (struct super_block * sb)
762{
763 struct ext3_super_block * es;
764 unsigned long desc_count, bitmap_count, x;
765 struct buffer_head *bitmap_bh = NULL;
766 struct ext3_group_desc * gdp;
767 int i;
768
769 es = EXT3_SB(sb)->s_es;
770 desc_count = 0;
771 bitmap_count = 0;
772 gdp = NULL;
773 for (i = 0; i < EXT3_SB(sb)->s_groups_count; i++) {
774 gdp = ext3_get_group_desc (sb, i, NULL);
775 if (!gdp)
776 continue;
777 desc_count += le16_to_cpu(gdp->bg_free_inodes_count);
778 brelse(bitmap_bh);
779 bitmap_bh = read_inode_bitmap(sb, i);
780 if (!bitmap_bh)
781 continue;
782
783 x = ext3_count_free(bitmap_bh, EXT3_INODES_PER_GROUP(sb) / 8);
784 if (le16_to_cpu(gdp->bg_free_inodes_count) != x)
785 ext3_error (sb, "ext3_check_inodes_bitmap",
786 "Wrong free inodes count in group %d, "
787 "stored = %d, counted = %lu", i,
788 le16_to_cpu(gdp->bg_free_inodes_count), x);
789 bitmap_count += x;
790 }
791 brelse(bitmap_bh);
792 if (le32_to_cpu(es->s_free_inodes_count) != bitmap_count)
793 ext3_error (sb, "ext3_check_inodes_bitmap",
794 "Wrong free inodes count in super block, "
795 "stored = %lu, counted = %lu",
796 (unsigned long)le32_to_cpu(es->s_free_inodes_count),
797 bitmap_count);
798}
799#endif