]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - fs/ext4/extents.c
ext4: flush the i_completed_io_list during ext4_truncate
[mv-sheeva.git] / fs / ext4 / extents.c
index 9081d1060a5f7577663990ebf9b32f048bdfd549..627f7ae94ae5570a7de9312faa26d882eccfbee7 100644 (file)
@@ -3533,6 +3533,12 @@ void ext4_ext_truncate(struct inode *inode)
        handle_t *handle;
        int err = 0;
 
+       /*
+        * finish any pending end_io work so we won't run the risk of
+        * converting any truncated blocks to initialized later
+        */
+       ext4_flush_completed_IO(inode);
+
        /*
         * probably first extent we're gonna free will be last in block
         */