diff options
Diffstat (limited to 'fs/ext3/inode.c')
-rw-r--r-- | fs/ext3/inode.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c index d3ef6566b01..466a332e0bd 100644 --- a/fs/ext3/inode.c +++ b/fs/ext3/inode.c @@ -2363,6 +2363,9 @@ void ext3_truncate(struct inode *inode) if (!ext3_can_truncate(inode)) return; + if (inode->i_size == 0 && ext3_should_writeback_data(inode)) + ei->i_state |= EXT3_STATE_FLUSH_ON_CLOSE; + /* * We have to lock the EOF page here, because lock_page() nests * outside journal_start(). |