diff options
author | Andi Kleen <andi@firstfloor.org> | 2010-06-14 13:28:03 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2010-06-14 13:28:03 -0400 |
commit | 5a0790c2c4a18435759a70e1562450035d778339 (patch) | |
tree | 80acb12d0e37196cf60ae4ca150c6b556115f302 /fs/ext4/mballoc.c | |
parent | 07a038245b28df9196ffb2e8cc626e9b956a4e23 (diff) |
ext4: remove initialized but not read variables
No real bugs found, just removed some dead code.
Found by gcc 4.6's new warnings.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/mballoc.c')
-rw-r--r-- | fs/ext4/mballoc.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index d9d267181ddc..b2948b047973 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c | |||
@@ -1999,7 +1999,6 @@ ext4_mb_regular_allocator(struct ext4_allocation_context *ac) | |||
1999 | ext4_group_t ngroups, group, i; | 1999 | ext4_group_t ngroups, group, i; |
2000 | int cr; | 2000 | int cr; |
2001 | int err = 0; | 2001 | int err = 0; |
2002 | int bsbits; | ||
2003 | struct ext4_sb_info *sbi; | 2002 | struct ext4_sb_info *sbi; |
2004 | struct super_block *sb; | 2003 | struct super_block *sb; |
2005 | struct ext4_buddy e4b; | 2004 | struct ext4_buddy e4b; |
@@ -2041,8 +2040,6 @@ ext4_mb_regular_allocator(struct ext4_allocation_context *ac) | |||
2041 | ac->ac_2order = i - 1; | 2040 | ac->ac_2order = i - 1; |
2042 | } | 2041 | } |
2043 | 2042 | ||
2044 | bsbits = ac->ac_sb->s_blocksize_bits; | ||
2045 | |||
2046 | /* if stream allocation is enabled, use global goal */ | 2043 | /* if stream allocation is enabled, use global goal */ |
2047 | if (ac->ac_flags & EXT4_MB_STREAM_ALLOC) { | 2044 | if (ac->ac_flags & EXT4_MB_STREAM_ALLOC) { |
2048 | /* TBD: may be hot point */ | 2045 | /* TBD: may be hot point */ |
@@ -2712,7 +2709,6 @@ ext4_mb_mark_diskspace_used(struct ext4_allocation_context *ac, | |||
2712 | handle_t *handle, unsigned int reserv_blks) | 2709 | handle_t *handle, unsigned int reserv_blks) |
2713 | { | 2710 | { |
2714 | struct buffer_head *bitmap_bh = NULL; | 2711 | struct buffer_head *bitmap_bh = NULL; |
2715 | struct ext4_super_block *es; | ||
2716 | struct ext4_group_desc *gdp; | 2712 | struct ext4_group_desc *gdp; |
2717 | struct buffer_head *gdp_bh; | 2713 | struct buffer_head *gdp_bh; |
2718 | struct ext4_sb_info *sbi; | 2714 | struct ext4_sb_info *sbi; |
@@ -2725,8 +2721,6 @@ ext4_mb_mark_diskspace_used(struct ext4_allocation_context *ac, | |||
2725 | 2721 | ||
2726 | sb = ac->ac_sb; | 2722 | sb = ac->ac_sb; |
2727 | sbi = EXT4_SB(sb); | 2723 | sbi = EXT4_SB(sb); |
2728 | es = sbi->s_es; | ||
2729 | |||
2730 | 2724 | ||
2731 | err = -EIO; | 2725 | err = -EIO; |
2732 | bitmap_bh = ext4_read_block_bitmap(sb, ac->ac_b_ex.fe_group); | 2726 | bitmap_bh = ext4_read_block_bitmap(sb, ac->ac_b_ex.fe_group); |
@@ -2850,7 +2844,7 @@ ext4_mb_normalize_request(struct ext4_allocation_context *ac, | |||
2850 | int bsbits, max; | 2844 | int bsbits, max; |
2851 | ext4_lblk_t end; | 2845 | ext4_lblk_t end; |
2852 | loff_t size, orig_size, start_off; | 2846 | loff_t size, orig_size, start_off; |
2853 | ext4_lblk_t start, orig_start; | 2847 | ext4_lblk_t start; |
2854 | struct ext4_inode_info *ei = EXT4_I(ac->ac_inode); | 2848 | struct ext4_inode_info *ei = EXT4_I(ac->ac_inode); |
2855 | struct ext4_prealloc_space *pa; | 2849 | struct ext4_prealloc_space *pa; |
2856 | 2850 | ||
@@ -2881,6 +2875,7 @@ ext4_mb_normalize_request(struct ext4_allocation_context *ac, | |||
2881 | size = size << bsbits; | 2875 | size = size << bsbits; |
2882 | if (size < i_size_read(ac->ac_inode)) | 2876 | if (size < i_size_read(ac->ac_inode)) |
2883 | size = i_size_read(ac->ac_inode); | 2877 | size = i_size_read(ac->ac_inode); |
2878 | orig_size = size; | ||
2884 | 2879 | ||
2885 | /* max size of free chunks */ | 2880 | /* max size of free chunks */ |
2886 | max = 2 << bsbits; | 2881 | max = 2 << bsbits; |
@@ -2922,8 +2917,8 @@ ext4_mb_normalize_request(struct ext4_allocation_context *ac, | |||
2922 | start_off = (loff_t)ac->ac_o_ex.fe_logical << bsbits; | 2917 | start_off = (loff_t)ac->ac_o_ex.fe_logical << bsbits; |
2923 | size = ac->ac_o_ex.fe_len << bsbits; | 2918 | size = ac->ac_o_ex.fe_len << bsbits; |
2924 | } | 2919 | } |
2925 | orig_size = size = size >> bsbits; | 2920 | size = size >> bsbits; |
2926 | orig_start = start = start_off >> bsbits; | 2921 | start = start_off >> bsbits; |
2927 | 2922 | ||
2928 | /* don't cover already allocated blocks in selected range */ | 2923 | /* don't cover already allocated blocks in selected range */ |
2929 | if (ar->pleft && start <= ar->lleft) { | 2924 | if (ar->pleft && start <= ar->lleft) { |
@@ -3547,7 +3542,6 @@ ext4_mb_release_inode_pa(struct ext4_buddy *e4b, struct buffer_head *bitmap_bh, | |||
3547 | ext4_group_t group; | 3542 | ext4_group_t group; |
3548 | ext4_grpblk_t bit; | 3543 | ext4_grpblk_t bit; |
3549 | unsigned long long grp_blk_start; | 3544 | unsigned long long grp_blk_start; |
3550 | sector_t start; | ||
3551 | int err = 0; | 3545 | int err = 0; |
3552 | int free = 0; | 3546 | int free = 0; |
3553 | 3547 | ||
@@ -3567,10 +3561,9 @@ ext4_mb_release_inode_pa(struct ext4_buddy *e4b, struct buffer_head *bitmap_bh, | |||
3567 | if (bit >= end) | 3561 | if (bit >= end) |
3568 | break; | 3562 | break; |
3569 | next = mb_find_next_bit(bitmap_bh->b_data, end, bit); | 3563 | next = mb_find_next_bit(bitmap_bh->b_data, end, bit); |
3570 | start = ext4_group_first_block_no(sb, group) + bit; | ||
3571 | mb_debug(1, " free preallocated %u/%u in group %u\n", | 3564 | mb_debug(1, " free preallocated %u/%u in group %u\n", |
3572 | (unsigned) start, (unsigned) next - bit, | 3565 | (unsigned) ext4_group_first_block_no(sb, group) + bit, |
3573 | (unsigned) group); | 3566 | (unsigned) next - bit, (unsigned) group); |
3574 | free += next - bit; | 3567 | free += next - bit; |
3575 | 3568 | ||
3576 | if (ac) { | 3569 | if (ac) { |
@@ -4494,7 +4487,6 @@ void ext4_free_blocks(handle_t *handle, struct inode *inode, | |||
4494 | struct super_block *sb = inode->i_sb; | 4487 | struct super_block *sb = inode->i_sb; |
4495 | struct ext4_allocation_context *ac = NULL; | 4488 | struct ext4_allocation_context *ac = NULL; |
4496 | struct ext4_group_desc *gdp; | 4489 | struct ext4_group_desc *gdp; |
4497 | struct ext4_super_block *es; | ||
4498 | unsigned long freed = 0; | 4490 | unsigned long freed = 0; |
4499 | unsigned int overflow; | 4491 | unsigned int overflow; |
4500 | ext4_grpblk_t bit; | 4492 | ext4_grpblk_t bit; |
@@ -4513,7 +4505,6 @@ void ext4_free_blocks(handle_t *handle, struct inode *inode, | |||
4513 | } | 4505 | } |
4514 | 4506 | ||
4515 | sbi = EXT4_SB(sb); | 4507 | sbi = EXT4_SB(sb); |
4516 | es = EXT4_SB(sb)->s_es; | ||
4517 | if (!(flags & EXT4_FREE_BLOCKS_VALIDATED) && | 4508 | if (!(flags & EXT4_FREE_BLOCKS_VALIDATED) && |
4518 | !ext4_data_block_valid(sbi, block, count)) { | 4509 | !ext4_data_block_valid(sbi, block, count)) { |
4519 | ext4_error(sb, "Freeing blocks not in datazone - " | 4510 | ext4_error(sb, "Freeing blocks not in datazone - " |