ext4: let ext4_truncate handle inline data correctly

Signed-off-by: Robin Dong <sanbai@taobao.com>
Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This commit is contained in:
Tao Ma
2012-12-10 14:06:02 -05:00
committed by Theodore Ts'o
parent 0d812f77b3
commit aef1c8513c
3 changed files with 107 additions and 0 deletions

View File

@@ -190,6 +190,8 @@ extern int ext4_inline_data_fiemap(struct inode *inode,
extern int ext4_try_to_evict_inline_data(handle_t *handle,
struct inode *inode,
int needed);
extern void ext4_inline_data_truncate(struct inode *inode, int *has_inline);
# else /* CONFIG_EXT4_FS_XATTR */
static inline int
@@ -411,6 +413,13 @@ static inline int ext4_inline_data_fiemap(struct inode *inode,
{
return 0;
}
static inline void ext4_inline_data_truncate(struct inode *inode,
int *has_inline)
{
return;
}
# endif /* CONFIG_EXT4_FS_XATTR */
#ifdef CONFIG_EXT4_FS_SECURITY