Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 198940
b: refs/heads/master
c: e39e07f
h: refs/heads/master
v: v3
  • Loading branch information
Jing Zhang authored and Theodore Ts'o committed May 14, 2010
1 parent a863566 commit 36c73fa
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 62e823a2cba18509ee826d775270e8ef9071b5bc
refs/heads/master: e39e07fdfd98be8650385f12a7b81d6adc547510
24 changes: 12 additions & 12 deletions trunk/fs/ext4/mballoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1150,7 +1150,7 @@ ext4_mb_load_buddy(struct super_block *sb, ext4_group_t group,
return ret;
}

static void ext4_mb_release_desc(struct ext4_buddy *e4b)
static void ext4_mb_unload_buddy(struct ext4_buddy *e4b)
{
if (e4b->bd_bitmap_page)
page_cache_release(e4b->bd_bitmap_page);
Expand Down Expand Up @@ -1617,7 +1617,7 @@ int ext4_mb_try_best_found(struct ext4_allocation_context *ac,
}

ext4_unlock_group(ac->ac_sb, group);
ext4_mb_release_desc(e4b);
ext4_mb_unload_buddy(e4b);

return 0;
}
Expand Down Expand Up @@ -1672,7 +1672,7 @@ int ext4_mb_find_by_goal(struct ext4_allocation_context *ac,
ext4_mb_use_best_found(ac, e4b);
}
ext4_unlock_group(ac->ac_sb, group);
ext4_mb_release_desc(e4b);
ext4_mb_unload_buddy(e4b);

return 0;
}
Expand Down Expand Up @@ -2042,7 +2042,7 @@ ext4_mb_regular_allocator(struct ext4_allocation_context *ac)
if (!ext4_mb_good_group(ac, group, cr)) {
/* someone did allocation from this group */
ext4_unlock_group(sb, group);
ext4_mb_release_desc(&e4b);
ext4_mb_unload_buddy(&e4b);
continue;
}

Expand All @@ -2056,7 +2056,7 @@ ext4_mb_regular_allocator(struct ext4_allocation_context *ac)
ext4_mb_complex_scan_group(ac, &e4b);

ext4_unlock_group(sb, group);
ext4_mb_release_desc(&e4b);
ext4_mb_unload_buddy(&e4b);

if (ac->ac_status != AC_STATUS_CONTINUE)
break;
Expand Down Expand Up @@ -2146,7 +2146,7 @@ static int ext4_mb_seq_groups_show(struct seq_file *seq, void *v)
ext4_lock_group(sb, group);
memcpy(&sg, ext4_get_group_info(sb, group), i);
ext4_unlock_group(sb, group);
ext4_mb_release_desc(&e4b);
ext4_mb_unload_buddy(&e4b);

seq_printf(seq, "#%-5u: %-5u %-5u %-5u [", group, sg.info.bb_free,
sg.info.bb_fragments, sg.info.bb_first_free);
Expand Down Expand Up @@ -2566,7 +2566,7 @@ static void release_blocks_on_commit(journal_t *journal, transaction_t *txn)
}
ext4_unlock_group(sb, entry->group);
kmem_cache_free(ext4_free_ext_cachep, entry);
ext4_mb_release_desc(&e4b);
ext4_mb_unload_buddy(&e4b);
}

mb_debug(1, "freed %u blocks in %u structures\n", count, count2);
Expand Down Expand Up @@ -3695,7 +3695,7 @@ ext4_mb_discard_group_preallocations(struct super_block *sb,
ext4_unlock_group(sb, group);
if (ac)
kmem_cache_free(ext4_ac_cachep, ac);
ext4_mb_release_desc(&e4b);
ext4_mb_unload_buddy(&e4b);
put_bh(bitmap_bh);
return free;
}
Expand Down Expand Up @@ -3799,7 +3799,7 @@ void ext4_discard_preallocations(struct inode *inode)
if (bitmap_bh == NULL) {
ext4_error(sb, "Error reading block bitmap for %u",
group);
ext4_mb_release_desc(&e4b);
ext4_mb_unload_buddy(&e4b);
continue;
}

Expand All @@ -3808,7 +3808,7 @@ void ext4_discard_preallocations(struct inode *inode)
ext4_mb_release_inode_pa(&e4b, bitmap_bh, pa, ac);
ext4_unlock_group(sb, group);

ext4_mb_release_desc(&e4b);
ext4_mb_unload_buddy(&e4b);
put_bh(bitmap_bh);

list_del(&pa->u.pa_tmp_list);
Expand Down Expand Up @@ -4072,7 +4072,7 @@ ext4_mb_discard_lg_preallocations(struct super_block *sb,
ext4_mb_release_group_pa(&e4b, pa, ac);
ext4_unlock_group(sb, group);

ext4_mb_release_desc(&e4b);
ext4_mb_unload_buddy(&e4b);
list_del(&pa->u.pa_tmp_list);
call_rcu(&(pa)->u.pa_rcu, ext4_mb_pa_callback);
}
Expand Down Expand Up @@ -4608,7 +4608,7 @@ void ext4_free_blocks(handle_t *handle, struct inode *inode,
atomic_add(count, &sbi->s_flex_groups[flex_group].free_blocks);
}

ext4_mb_release_desc(&e4b);
ext4_mb_unload_buddy(&e4b);

freed += count;

Expand Down

0 comments on commit 36c73fa

Please sign in to comment.