diff options
-rw-r--r-- | fs/ext4/mballoc.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 0550ea3532f9..8639d5a637b2 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c | |||
@@ -1150,7 +1150,7 @@ err: | |||
1150 | return ret; | 1150 | return ret; |
1151 | } | 1151 | } |
1152 | 1152 | ||
1153 | static void ext4_mb_release_desc(struct ext4_buddy *e4b) | 1153 | static void ext4_mb_unload_buddy(struct ext4_buddy *e4b) |
1154 | { | 1154 | { |
1155 | if (e4b->bd_bitmap_page) | 1155 | if (e4b->bd_bitmap_page) |
1156 | page_cache_release(e4b->bd_bitmap_page); | 1156 | page_cache_release(e4b->bd_bitmap_page); |
@@ -1617,7 +1617,7 @@ int ext4_mb_try_best_found(struct ext4_allocation_context *ac, | |||
1617 | } | 1617 | } |
1618 | 1618 | ||
1619 | ext4_unlock_group(ac->ac_sb, group); | 1619 | ext4_unlock_group(ac->ac_sb, group); |
1620 | ext4_mb_release_desc(e4b); | 1620 | ext4_mb_unload_buddy(e4b); |
1621 | 1621 | ||
1622 | return 0; | 1622 | return 0; |
1623 | } | 1623 | } |
@@ -1672,7 +1672,7 @@ int ext4_mb_find_by_goal(struct ext4_allocation_context *ac, | |||
1672 | ext4_mb_use_best_found(ac, e4b); | 1672 | ext4_mb_use_best_found(ac, e4b); |
1673 | } | 1673 | } |
1674 | ext4_unlock_group(ac->ac_sb, group); | 1674 | ext4_unlock_group(ac->ac_sb, group); |
1675 | ext4_mb_release_desc(e4b); | 1675 | ext4_mb_unload_buddy(e4b); |
1676 | 1676 | ||
1677 | return 0; | 1677 | return 0; |
1678 | } | 1678 | } |
@@ -2042,7 +2042,7 @@ repeat: | |||
2042 | if (!ext4_mb_good_group(ac, group, cr)) { | 2042 | if (!ext4_mb_good_group(ac, group, cr)) { |
2043 | /* someone did allocation from this group */ | 2043 | /* someone did allocation from this group */ |
2044 | ext4_unlock_group(sb, group); | 2044 | ext4_unlock_group(sb, group); |
2045 | ext4_mb_release_desc(&e4b); | 2045 | ext4_mb_unload_buddy(&e4b); |
2046 | continue; | 2046 | continue; |
2047 | } | 2047 | } |
2048 | 2048 | ||
@@ -2056,7 +2056,7 @@ repeat: | |||
2056 | ext4_mb_complex_scan_group(ac, &e4b); | 2056 | ext4_mb_complex_scan_group(ac, &e4b); |
2057 | 2057 | ||
2058 | ext4_unlock_group(sb, group); | 2058 | ext4_unlock_group(sb, group); |
2059 | ext4_mb_release_desc(&e4b); | 2059 | ext4_mb_unload_buddy(&e4b); |
2060 | 2060 | ||
2061 | if (ac->ac_status != AC_STATUS_CONTINUE) | 2061 | if (ac->ac_status != AC_STATUS_CONTINUE) |
2062 | break; | 2062 | break; |
@@ -2146,7 +2146,7 @@ static int ext4_mb_seq_groups_show(struct seq_file *seq, void *v) | |||
2146 | ext4_lock_group(sb, group); | 2146 | ext4_lock_group(sb, group); |
2147 | memcpy(&sg, ext4_get_group_info(sb, group), i); | 2147 | memcpy(&sg, ext4_get_group_info(sb, group), i); |
2148 | ext4_unlock_group(sb, group); | 2148 | ext4_unlock_group(sb, group); |
2149 | ext4_mb_release_desc(&e4b); | 2149 | ext4_mb_unload_buddy(&e4b); |
2150 | 2150 | ||
2151 | seq_printf(seq, "#%-5u: %-5u %-5u %-5u [", group, sg.info.bb_free, | 2151 | seq_printf(seq, "#%-5u: %-5u %-5u %-5u [", group, sg.info.bb_free, |
2152 | sg.info.bb_fragments, sg.info.bb_first_free); | 2152 | sg.info.bb_fragments, sg.info.bb_first_free); |
@@ -2566,7 +2566,7 @@ static void release_blocks_on_commit(journal_t *journal, transaction_t *txn) | |||
2566 | } | 2566 | } |
2567 | ext4_unlock_group(sb, entry->group); | 2567 | ext4_unlock_group(sb, entry->group); |
2568 | kmem_cache_free(ext4_free_ext_cachep, entry); | 2568 | kmem_cache_free(ext4_free_ext_cachep, entry); |
2569 | ext4_mb_release_desc(&e4b); | 2569 | ext4_mb_unload_buddy(&e4b); |
2570 | } | 2570 | } |
2571 | 2571 | ||
2572 | mb_debug(1, "freed %u blocks in %u structures\n", count, count2); | 2572 | mb_debug(1, "freed %u blocks in %u structures\n", count, count2); |
@@ -3695,7 +3695,7 @@ out: | |||
3695 | ext4_unlock_group(sb, group); | 3695 | ext4_unlock_group(sb, group); |
3696 | if (ac) | 3696 | if (ac) |
3697 | kmem_cache_free(ext4_ac_cachep, ac); | 3697 | kmem_cache_free(ext4_ac_cachep, ac); |
3698 | ext4_mb_release_desc(&e4b); | 3698 | ext4_mb_unload_buddy(&e4b); |
3699 | put_bh(bitmap_bh); | 3699 | put_bh(bitmap_bh); |
3700 | return free; | 3700 | return free; |
3701 | } | 3701 | } |
@@ -3799,7 +3799,7 @@ repeat: | |||
3799 | if (bitmap_bh == NULL) { | 3799 | if (bitmap_bh == NULL) { |
3800 | ext4_error(sb, "Error reading block bitmap for %u", | 3800 | ext4_error(sb, "Error reading block bitmap for %u", |
3801 | group); | 3801 | group); |
3802 | ext4_mb_release_desc(&e4b); | 3802 | ext4_mb_unload_buddy(&e4b); |
3803 | continue; | 3803 | continue; |
3804 | } | 3804 | } |
3805 | 3805 | ||
@@ -3808,7 +3808,7 @@ repeat: | |||
3808 | ext4_mb_release_inode_pa(&e4b, bitmap_bh, pa, ac); | 3808 | ext4_mb_release_inode_pa(&e4b, bitmap_bh, pa, ac); |
3809 | ext4_unlock_group(sb, group); | 3809 | ext4_unlock_group(sb, group); |
3810 | 3810 | ||
3811 | ext4_mb_release_desc(&e4b); | 3811 | ext4_mb_unload_buddy(&e4b); |
3812 | put_bh(bitmap_bh); | 3812 | put_bh(bitmap_bh); |
3813 | 3813 | ||
3814 | list_del(&pa->u.pa_tmp_list); | 3814 | list_del(&pa->u.pa_tmp_list); |
@@ -4072,7 +4072,7 @@ ext4_mb_discard_lg_preallocations(struct super_block *sb, | |||
4072 | ext4_mb_release_group_pa(&e4b, pa, ac); | 4072 | ext4_mb_release_group_pa(&e4b, pa, ac); |
4073 | ext4_unlock_group(sb, group); | 4073 | ext4_unlock_group(sb, group); |
4074 | 4074 | ||
4075 | ext4_mb_release_desc(&e4b); | 4075 | ext4_mb_unload_buddy(&e4b); |
4076 | list_del(&pa->u.pa_tmp_list); | 4076 | list_del(&pa->u.pa_tmp_list); |
4077 | call_rcu(&(pa)->u.pa_rcu, ext4_mb_pa_callback); | 4077 | call_rcu(&(pa)->u.pa_rcu, ext4_mb_pa_callback); |
4078 | } | 4078 | } |
@@ -4608,7 +4608,7 @@ do_more: | |||
4608 | atomic_add(count, &sbi->s_flex_groups[flex_group].free_blocks); | 4608 | atomic_add(count, &sbi->s_flex_groups[flex_group].free_blocks); |
4609 | } | 4609 | } |
4610 | 4610 | ||
4611 | ext4_mb_release_desc(&e4b); | 4611 | ext4_mb_unload_buddy(&e4b); |
4612 | 4612 | ||
4613 | freed += count; | 4613 | freed += count; |
4614 | 4614 | ||