]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/ext3/inode.c
Merge branch 'ext3-latency-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-omap-h63xx.git] / fs / ext3 / inode.c
index d3ef6566b0190340b21f94402a811f5a45d4f38d..466a332e0bd124c871143cfd682392074252aa76 100644 (file)
@@ -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().