diff options
author | Theodore Ts'o <tytso@mit.edu> | 2008-10-10 09:40:52 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2008-10-10 09:40:52 -0400 |
commit | c2ea3fde61f1df1dbf062345f23277dcd6f01dfe (patch) | |
tree | 53ecbf57416326810540494e814c05753bf30874 /fs/ext4/extents.c | |
parent | 240799cdf22bd789ea6852653c3b879d35ad0a6c (diff) | |
download | linux-c2ea3fde61f1df1dbf062345f23277dcd6f01dfe.tar.bz2 |
ext4: Remove old legacy block allocator
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/extents.c')
-rw-r--r-- | fs/ext4/extents.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index e8758df2617b..c8f81f2fb28e 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -2697,11 +2697,8 @@ int ext4_ext_get_blocks(handle_t *handle, struct inode *inode, goto out2; } /* - * Okay, we need to do block allocation. Lazily initialize the block - * allocation info here if necessary. + * Okay, we need to do block allocation. */ - if (S_ISREG(inode->i_mode) && (!EXT4_I(inode)->i_block_alloc_info)) - ext4_init_block_alloc_info(inode); /* find neighbour allocated blocks */ ar.lleft = iblock; @@ -2761,7 +2758,7 @@ int ext4_ext_get_blocks(handle_t *handle, struct inode *inode, /* free data blocks we just allocated */ /* not a good idea to call discard here directly, * but otherwise we'd need to call it every free() */ - ext4_mb_discard_inode_preallocations(inode); + ext4_discard_preallocations(inode); ext4_free_blocks(handle, inode, ext_pblock(&newex), ext4_ext_get_actual_len(&newex), 0); goto out2; @@ -2825,7 +2822,7 @@ void ext4_ext_truncate(struct inode *inode) down_write(&EXT4_I(inode)->i_data_sem); ext4_ext_invalidate_cache(inode); - ext4_discard_reservation(inode); + ext4_discard_preallocations(inode); /* * TODO: optimization is possible here. |