diff options
author | Theodore Ts'o <tytso@mit.edu> | 2013-04-03 12:47:17 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2013-04-03 12:47:17 -0400 |
commit | 819c4920b7e60ecfd6f0f61d890af4cdf3873d18 (patch) | |
tree | 85f995b14c7308080d196d85b9b3d148337a6382 /fs/ext4/ext4.h | |
parent | 26a4c0c6ccecf6814cf44f951c97222bd795bc1a (diff) |
ext4: refactor truncate code
Move common code in ext4_ind_truncate() and ext4_ext_truncate() into
ext4_truncate(). This saves over 60 lines of code.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ext4.h')
-rw-r--r-- | fs/ext4/ext4.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 0649253804c4..d05ba3886f33 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h | |||
@@ -2109,7 +2109,7 @@ extern ssize_t ext4_ind_direct_IO(int rw, struct kiocb *iocb, | |||
2109 | unsigned long nr_segs); | 2109 | unsigned long nr_segs); |
2110 | extern int ext4_ind_calc_metadata_amount(struct inode *inode, sector_t lblock); | 2110 | extern int ext4_ind_calc_metadata_amount(struct inode *inode, sector_t lblock); |
2111 | extern int ext4_ind_trans_blocks(struct inode *inode, int nrblocks, int chunk); | 2111 | extern int ext4_ind_trans_blocks(struct inode *inode, int nrblocks, int chunk); |
2112 | extern void ext4_ind_truncate(struct inode *inode); | 2112 | extern void ext4_ind_truncate(handle_t *, struct inode *inode); |
2113 | extern int ext4_free_hole_blocks(handle_t *handle, struct inode *inode, | 2113 | extern int ext4_free_hole_blocks(handle_t *handle, struct inode *inode, |
2114 | ext4_lblk_t first, ext4_lblk_t stop); | 2114 | ext4_lblk_t first, ext4_lblk_t stop); |
2115 | 2115 | ||
@@ -2575,7 +2575,7 @@ extern int ext4_ext_index_trans_blocks(struct inode *inode, int nrblocks, | |||
2575 | int chunk); | 2575 | int chunk); |
2576 | extern int ext4_ext_map_blocks(handle_t *handle, struct inode *inode, | 2576 | extern int ext4_ext_map_blocks(handle_t *handle, struct inode *inode, |
2577 | struct ext4_map_blocks *map, int flags); | 2577 | struct ext4_map_blocks *map, int flags); |
2578 | extern void ext4_ext_truncate(struct inode *); | 2578 | extern void ext4_ext_truncate(handle_t *, struct inode *); |
2579 | extern int ext4_ext_remove_space(struct inode *inode, ext4_lblk_t start, | 2579 | extern int ext4_ext_remove_space(struct inode *inode, ext4_lblk_t start, |
2580 | ext4_lblk_t end); | 2580 | ext4_lblk_t end); |
2581 | extern void ext4_ext_init(struct super_block *); | 2581 | extern void ext4_ext_init(struct super_block *); |