aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/extents.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2008-10-10 09:40:52 -0400
committerTheodore Ts'o <tytso@mit.edu>2008-10-10 09:40:52 -0400
commitc2ea3fde61f1df1dbf062345f23277dcd6f01dfe (patch)
tree53ecbf57416326810540494e814c05753bf30874 /fs/ext4/extents.c
parent240799cdf22bd789ea6852653c3b879d35ad0a6c (diff)
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.c9
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,
2697 goto out2; 2697 goto out2;
2698 } 2698 }
2699 /* 2699 /*
2700 * Okay, we need to do block allocation. Lazily initialize the block 2700 * Okay, we need to do block allocation.
2701 * allocation info here if necessary.
2702 */ 2701 */
2703 if (S_ISREG(inode->i_mode) && (!EXT4_I(inode)->i_block_alloc_info))
2704 ext4_init_block_alloc_info(inode);
2705 2702
2706 /* find neighbour allocated blocks */ 2703 /* find neighbour allocated blocks */
2707 ar.lleft = iblock; 2704 ar.lleft = iblock;
@@ -2761,7 +2758,7 @@ int ext4_ext_get_blocks(handle_t *handle, struct inode *inode,
2761 /* free data blocks we just allocated */ 2758 /* free data blocks we just allocated */
2762 /* not a good idea to call discard here directly, 2759 /* not a good idea to call discard here directly,
2763 * but otherwise we'd need to call it every free() */ 2760 * but otherwise we'd need to call it every free() */
2764 ext4_mb_discard_inode_preallocations(inode); 2761 ext4_discard_preallocations(inode);
2765 ext4_free_blocks(handle, inode, ext_pblock(&newex), 2762 ext4_free_blocks(handle, inode, ext_pblock(&newex),
2766 ext4_ext_get_actual_len(&newex), 0); 2763 ext4_ext_get_actual_len(&newex), 0);
2767 goto out2; 2764 goto out2;
@@ -2825,7 +2822,7 @@ void ext4_ext_truncate(struct inode *inode)
2825 down_write(&EXT4_I(inode)->i_data_sem); 2822 down_write(&EXT4_I(inode)->i_data_sem);
2826 ext4_ext_invalidate_cache(inode); 2823 ext4_ext_invalidate_cache(inode);
2827 2824
2828 ext4_discard_reservation(inode); 2825 ext4_discard_preallocations(inode);
2829 2826
2830 /* 2827 /*
2831 * TODO: optimization is possible here. 2828 * TODO: optimization is possible here.