From b8610f5bdb489710f2d7a7d91f2989bac18740bc Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Mon, 10 Jan 2011 12:47:07 -0500 Subject: [PATCH] --- yaml --- r: 229134 b: refs/heads/master c: a5196f8cdfbf6ccb20f093aaf48852d6d23b4e0b h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/ext4/mballoc.c | 14 -------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/[refs] b/[refs] index 5b2819542745..aff74f0dce07 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3889fd57ea3c58209354862523275774fca9db03 +refs/heads/master: a5196f8cdfbf6ccb20f093aaf48852d6d23b4e0b diff --git a/trunk/fs/ext4/mballoc.c b/trunk/fs/ext4/mballoc.c index 21ee30b86de5..cd5214f75397 100644 --- a/trunk/fs/ext4/mballoc.c +++ b/trunk/fs/ext4/mballoc.c @@ -3881,19 +3881,6 @@ void ext4_discard_preallocations(struct inode *inode) } } -/* - * finds all preallocated spaces and return blocks being freed to them - * if preallocated space becomes full (no block is used from the space) - * then the function frees space in buddy - * XXX: at the moment, truncate (which is the only way to free blocks) - * discards all preallocations - */ -static void ext4_mb_return_to_preallocation(struct inode *inode, - struct ext4_buddy *e4b, - sector_t block, int count) -{ - BUG_ON(!list_empty(&EXT4_I(inode)->i_prealloc_list)); -} #ifdef CONFIG_EXT4_DEBUG static void ext4_mb_show_ac(struct ext4_allocation_context *ac) { @@ -4648,7 +4635,6 @@ void ext4_free_blocks(handle_t *handle, struct inode *inode, ext4_lock_group(sb, block_group); mb_clear_bits(bitmap_bh->b_data, bit, count); mb_free_blocks(inode, &e4b, bit, count); - ext4_mb_return_to_preallocation(inode, &e4b, block, count); } ret = ext4_free_blks_count(sb, gdp) + count;