aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext2/ialloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext2/ialloc.c')
-rw-r--r--fs/ext2/ialloc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ext2/ialloc.c b/fs/ext2/ialloc.c
index e52765219e16..308c252568c6 100644
--- a/fs/ext2/ialloc.c
+++ b/fs/ext2/ialloc.c
@@ -638,6 +638,7 @@ fail:
638 return ERR_PTR(err); 638 return ERR_PTR(err);
639} 639}
640 640
641/* Superblock must be locked */
641unsigned long ext2_count_free_inodes (struct super_block * sb) 642unsigned long ext2_count_free_inodes (struct super_block * sb)
642{ 643{
643 struct ext2_group_desc *desc; 644 struct ext2_group_desc *desc;
@@ -649,7 +650,6 @@ unsigned long ext2_count_free_inodes (struct super_block * sb)
649 unsigned long bitmap_count = 0; 650 unsigned long bitmap_count = 0;
650 struct buffer_head *bitmap_bh = NULL; 651 struct buffer_head *bitmap_bh = NULL;
651 652
652 lock_super (sb);
653 es = EXT2_SB(sb)->s_es; 653 es = EXT2_SB(sb)->s_es;
654 for (i = 0; i < EXT2_SB(sb)->s_groups_count; i++) { 654 for (i = 0; i < EXT2_SB(sb)->s_groups_count; i++) {
655 unsigned x; 655 unsigned x;
@@ -672,7 +672,6 @@ unsigned long ext2_count_free_inodes (struct super_block * sb)
672 printk("ext2_count_free_inodes: stored = %lu, computed = %lu, %lu\n", 672 printk("ext2_count_free_inodes: stored = %lu, computed = %lu, %lu\n",
673 percpu_counter_read(&EXT2_SB(sb)->s_freeinodes_counter), 673 percpu_counter_read(&EXT2_SB(sb)->s_freeinodes_counter),
674 desc_count, bitmap_count); 674 desc_count, bitmap_count);
675 unlock_super(sb);
676 return desc_count; 675 return desc_count;
677#else 676#else
678 for (i = 0; i < EXT2_SB(sb)->s_groups_count; i++) { 677 for (i = 0; i < EXT2_SB(sb)->s_groups_count; i++) {