Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 229134
b: refs/heads/master
c: a5196f8
h: refs/heads/master
v: v3
  • Loading branch information
Theodore Ts'o committed Jan 10, 2011
1 parent 9ef4745 commit b8610f5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 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: 3889fd57ea3c58209354862523275774fca9db03
refs/heads/master: a5196f8cdfbf6ccb20f093aaf48852d6d23b4e0b
14 changes: 0 additions & 14 deletions trunk/fs/ext4/mballoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit b8610f5

Please sign in to comment.