aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ext4/balloc.c2
-rw-r--r--fs/ext4/ext4.h2
-rw-r--r--fs/ext4/mballoc.c9
3 files changed, 1 insertions, 12 deletions
diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c
index e2126d70dff5..1d0418980f8d 100644
--- a/fs/ext4/balloc.c
+++ b/fs/ext4/balloc.c
@@ -478,7 +478,7 @@ void ext4_add_groupblocks(handle_t *handle, struct super_block *sb,
478 * new bitmap information 478 * new bitmap information
479 */ 479 */
480 set_bit(EXT4_GROUP_INFO_NEED_INIT_BIT, &(grp->bb_state)); 480 set_bit(EXT4_GROUP_INFO_NEED_INIT_BIT, &(grp->bb_state));
481 ext4_mb_update_group_info(grp, blocks_freed); 481 grp->bb_free += blocks_freed;
482 up_write(&grp->alloc_sem); 482 up_write(&grp->alloc_sem);
483 483
484 /* We dirtied the bitmap block */ 484 /* We dirtied the bitmap block */
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index fb21663ffe54..02b22885eb02 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -1343,8 +1343,6 @@ extern void ext4_mb_free_blocks(handle_t *, struct inode *,
1343 ext4_fsblk_t, unsigned long, int, unsigned long *); 1343 ext4_fsblk_t, unsigned long, int, unsigned long *);
1344extern int ext4_mb_add_groupinfo(struct super_block *sb, 1344extern int ext4_mb_add_groupinfo(struct super_block *sb,
1345 ext4_group_t i, struct ext4_group_desc *desc); 1345 ext4_group_t i, struct ext4_group_desc *desc);
1346extern void ext4_mb_update_group_info(struct ext4_group_info *grp,
1347 ext4_grpblk_t add);
1348extern int ext4_mb_get_buddy_cache_lock(struct super_block *, ext4_group_t); 1346extern int ext4_mb_get_buddy_cache_lock(struct super_block *, ext4_group_t);
1349extern void ext4_mb_put_buddy_cache_lock(struct super_block *, 1347extern void ext4_mb_put_buddy_cache_lock(struct super_block *,
1350 ext4_group_t, int); 1348 ext4_group_t, int);
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index faf5bd056a93..833d87236881 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -2554,15 +2554,6 @@ exit_meta_group_info:
2554 return -ENOMEM; 2554 return -ENOMEM;
2555} /* ext4_mb_add_groupinfo */ 2555} /* ext4_mb_add_groupinfo */
2556 2556
2557/*
2558 * Update an existing group.
2559 * This function is used for online resize
2560 */
2561void ext4_mb_update_group_info(struct ext4_group_info *grp, ext4_grpblk_t add)
2562{
2563 grp->bb_free += add;
2564}
2565
2566static int ext4_mb_init_backend(struct super_block *sb) 2557static int ext4_mb_init_backend(struct super_block *sb)
2567{ 2558{
2568 ext4_group_t ngroups = ext4_get_groups_count(sb); 2559 ext4_group_t ngroups = ext4_get_groups_count(sb);