diff options
Diffstat (limited to 'fs/ext4/mballoc.c')
-rw-r--r-- | fs/ext4/mballoc.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 21ee30b86de5..cd5214f75397 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c | |||
@@ -3881,19 +3881,6 @@ repeat: | |||
3881 | } | 3881 | } |
3882 | } | 3882 | } |
3883 | 3883 | ||
3884 | /* | ||
3885 | * finds all preallocated spaces and return blocks being freed to them | ||
3886 | * if preallocated space becomes full (no block is used from the space) | ||
3887 | * then the function frees space in buddy | ||
3888 | * XXX: at the moment, truncate (which is the only way to free blocks) | ||
3889 | * discards all preallocations | ||
3890 | */ | ||
3891 | static void ext4_mb_return_to_preallocation(struct inode *inode, | ||
3892 | struct ext4_buddy *e4b, | ||
3893 | sector_t block, int count) | ||
3894 | { | ||
3895 | BUG_ON(!list_empty(&EXT4_I(inode)->i_prealloc_list)); | ||
3896 | } | ||
3897 | #ifdef CONFIG_EXT4_DEBUG | 3884 | #ifdef CONFIG_EXT4_DEBUG |
3898 | static void ext4_mb_show_ac(struct ext4_allocation_context *ac) | 3885 | static void ext4_mb_show_ac(struct ext4_allocation_context *ac) |
3899 | { | 3886 | { |
@@ -4648,7 +4635,6 @@ do_more: | |||
4648 | ext4_lock_group(sb, block_group); | 4635 | ext4_lock_group(sb, block_group); |
4649 | mb_clear_bits(bitmap_bh->b_data, bit, count); | 4636 | mb_clear_bits(bitmap_bh->b_data, bit, count); |
4650 | mb_free_blocks(inode, &e4b, bit, count); | 4637 | mb_free_blocks(inode, &e4b, bit, count); |
4651 | ext4_mb_return_to_preallocation(inode, &e4b, block, count); | ||
4652 | } | 4638 | } |
4653 | 4639 | ||
4654 | ret = ext4_free_blks_count(sb, gdp) + count; | 4640 | ret = ext4_free_blks_count(sb, gdp) + count; |