|
@@ -829,7 +829,8 @@ static int ext4_clear_blocks(handle_t *handle, struct inode *inode,
|
|
int flags = EXT4_FREE_BLOCKS_VALIDATED;
|
|
int flags = EXT4_FREE_BLOCKS_VALIDATED;
|
|
int err;
|
|
int err;
|
|
|
|
|
|
- if (S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode))
|
|
|
|
|
|
+ if (S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode) ||
|
|
|
|
+ ext4_test_inode_flag(inode, EXT4_INODE_EA_INODE))
|
|
flags |= EXT4_FREE_BLOCKS_FORGET | EXT4_FREE_BLOCKS_METADATA;
|
|
flags |= EXT4_FREE_BLOCKS_FORGET | EXT4_FREE_BLOCKS_METADATA;
|
|
else if (ext4_should_journal_data(inode))
|
|
else if (ext4_should_journal_data(inode))
|
|
flags |= EXT4_FREE_BLOCKS_FORGET;
|
|
flags |= EXT4_FREE_BLOCKS_FORGET;
|