diff options
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r-- | fs/ext4/inode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index d3118d1acc39..bed4a0abd0d1 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c | |||
@@ -3908,7 +3908,7 @@ void ext4_truncate(struct inode *inode) | |||
3908 | if (!ext4_can_truncate(inode)) | 3908 | if (!ext4_can_truncate(inode)) |
3909 | return; | 3909 | return; |
3910 | 3910 | ||
3911 | if (inode->i_size == 0) | 3911 | if (inode->i_size == 0 && !test_opt(inode->i_sb, NO_AUTO_DA_ALLOC)) |
3912 | ei->i_state |= EXT4_STATE_DA_ALLOC_CLOSE; | 3912 | ei->i_state |= EXT4_STATE_DA_ALLOC_CLOSE; |
3913 | 3913 | ||
3914 | if (EXT4_I(inode)->i_flags & EXT4_EXTENTS_FL) { | 3914 | if (EXT4_I(inode)->i_flags & EXT4_EXTENTS_FL) { |