diff options
author | Jan Blunck <jblunck@infradead.org> | 2010-02-24 07:25:29 -0500 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2010-10-04 15:10:36 -0400 |
commit | d646cf82e9b6a58ba2d748e66e5fc7223830c68c (patch) | |
tree | fd983a3173775d9db7095d886e12ab2f4fe29fe8 /fs | |
parent | b0991aa324b57dca8feef75ed75b24080ee4a9fc (diff) |
BKL: Remove BKL from ext3 fill_super()
The BKL is protecting nothing than two memory allocations here.
Signed-off-by: Jan Blunck <jblunck@infradead.org>
Acked-by: Jan Kara <jack@suse.cz>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ext3/super.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/fs/ext3/super.c b/fs/ext3/super.c index 41f9dcd73e97..edde63fdb9a1 100644 --- a/fs/ext3/super.c +++ b/fs/ext3/super.c | |||
@@ -1611,19 +1611,14 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent) | |||
1611 | __le32 features; | 1611 | __le32 features; |
1612 | int err; | 1612 | int err; |
1613 | 1613 | ||
1614 | lock_kernel(); | ||
1615 | |||
1616 | sbi = kzalloc(sizeof(*sbi), GFP_KERNEL); | 1614 | sbi = kzalloc(sizeof(*sbi), GFP_KERNEL); |
1617 | if (!sbi) { | 1615 | if (!sbi) |
1618 | unlock_kernel(); | ||
1619 | return -ENOMEM; | 1616 | return -ENOMEM; |
1620 | } | ||
1621 | 1617 | ||
1622 | sbi->s_blockgroup_lock = | 1618 | sbi->s_blockgroup_lock = |
1623 | kzalloc(sizeof(struct blockgroup_lock), GFP_KERNEL); | 1619 | kzalloc(sizeof(struct blockgroup_lock), GFP_KERNEL); |
1624 | if (!sbi->s_blockgroup_lock) { | 1620 | if (!sbi->s_blockgroup_lock) { |
1625 | kfree(sbi); | 1621 | kfree(sbi); |
1626 | unlock_kernel(); | ||
1627 | return -ENOMEM; | 1622 | return -ENOMEM; |
1628 | } | 1623 | } |
1629 | sb->s_fs_info = sbi; | 1624 | sb->s_fs_info = sbi; |
@@ -1632,8 +1627,6 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent) | |||
1632 | sbi->s_resgid = EXT3_DEF_RESGID; | 1627 | sbi->s_resgid = EXT3_DEF_RESGID; |
1633 | sbi->s_sb_block = sb_block; | 1628 | sbi->s_sb_block = sb_block; |
1634 | 1629 | ||
1635 | unlock_kernel(); | ||
1636 | |||
1637 | blocksize = sb_min_blocksize(sb, EXT3_MIN_BLOCK_SIZE); | 1630 | blocksize = sb_min_blocksize(sb, EXT3_MIN_BLOCK_SIZE); |
1638 | if (!blocksize) { | 1631 | if (!blocksize) { |
1639 | ext3_msg(sb, KERN_ERR, "error: unable to set blocksize"); | 1632 | ext3_msg(sb, KERN_ERR, "error: unable to set blocksize"); |
@@ -2030,8 +2023,6 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent) | |||
2030 | test_opt(sb,DATA_FLAGS) == EXT3_MOUNT_ORDERED_DATA ? "ordered": | 2023 | test_opt(sb,DATA_FLAGS) == EXT3_MOUNT_ORDERED_DATA ? "ordered": |
2031 | "writeback"); | 2024 | "writeback"); |
2032 | 2025 | ||
2033 | lock_kernel(); | ||
2034 | unlock_kernel(); | ||
2035 | return 0; | 2026 | return 0; |
2036 | 2027 | ||
2037 | cantfind_ext3: | 2028 | cantfind_ext3: |
@@ -2061,8 +2052,6 @@ out_fail: | |||
2061 | sb->s_fs_info = NULL; | 2052 | sb->s_fs_info = NULL; |
2062 | kfree(sbi->s_blockgroup_lock); | 2053 | kfree(sbi->s_blockgroup_lock); |
2063 | kfree(sbi); | 2054 | kfree(sbi); |
2064 | lock_kernel(); | ||
2065 | unlock_kernel(); | ||
2066 | return ret; | 2055 | return ret; |
2067 | } | 2056 | } |
2068 | 2057 | ||