aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/super.c
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2009-05-02 20:35:09 -0400
committerTheodore Ts'o <tytso@mit.edu>2009-05-02 20:35:09 -0400
commit955ce5f5be67dfe0d1d096b543af33fe8a1ce3dd (patch)
tree68b0bdbef1594a3e43c1ef28ae8e096b40a06ae4 /fs/ext4/super.c
parenteefd7f03b86b8a319890e7fac5a6fcc7f8694b76 (diff)
ext4: Convert ext4_lock_group to use sb_bgl_lock
We have sb_bgl_lock() and ext4_group_info.bb_state bit spinlock to protech group information. The later is only used within mballoc code. Consolidate them to use sb_bgl_lock(). This makes the mballoc.c code much simpler and also avoid confusion with two locks protecting same info. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r--fs/ext4/super.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 39223a52bc71..dc34ed3d1327 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1784,18 +1784,18 @@ static int ext4_check_descriptors(struct super_block *sb)
1784 "(block %llu)!\n", i, inode_table); 1784 "(block %llu)!\n", i, inode_table);
1785 return 0; 1785 return 0;
1786 } 1786 }
1787 spin_lock(sb_bgl_lock(sbi, i)); 1787 ext4_lock_group(sb, i);
1788 if (!ext4_group_desc_csum_verify(sbi, i, gdp)) { 1788 if (!ext4_group_desc_csum_verify(sbi, i, gdp)) {
1789 printk(KERN_ERR "EXT4-fs: ext4_check_descriptors: " 1789 printk(KERN_ERR "EXT4-fs: ext4_check_descriptors: "
1790 "Checksum for group %u failed (%u!=%u)\n", 1790 "Checksum for group %u failed (%u!=%u)\n",
1791 i, le16_to_cpu(ext4_group_desc_csum(sbi, i, 1791 i, le16_to_cpu(ext4_group_desc_csum(sbi, i,
1792 gdp)), le16_to_cpu(gdp->bg_checksum)); 1792 gdp)), le16_to_cpu(gdp->bg_checksum));
1793 if (!(sb->s_flags & MS_RDONLY)) { 1793 if (!(sb->s_flags & MS_RDONLY)) {
1794 spin_unlock(sb_bgl_lock(sbi, i)); 1794 ext4_unlock_group(sb, i);
1795 return 0; 1795 return 0;
1796 } 1796 }
1797 } 1797 }
1798 spin_unlock(sb_bgl_lock(sbi, i)); 1798 ext4_unlock_group(sb, i);
1799 if (!flexbg_flag) 1799 if (!flexbg_flag)
1800 first_block += EXT4_BLOCKS_PER_GROUP(sb); 1800 first_block += EXT4_BLOCKS_PER_GROUP(sb);
1801 } 1801 }