shithub: lwext4

Download patch

ref: 305530fefb168eeb0cd7b29c1ef481b5918d5ce2
parent: e40ab39b1205be9ea02700bb246ca2085bb057d6
author: gkostka <kostka.grzegorz@gmail.com>
date: Tue Apr 8 17:08:45 EDT 2014

Fixed extent depth after truncate.

--- a/lwext4/ext4_extent.c
+++ b/lwext4/ext4_extent.c
@@ -594,6 +594,9 @@
             ext4_block_set(inode_ref->fs->bdev, &path[i].block);
     }
 
+    if(!entries)
+        ext4_extent_header_set_depth(path->header, 0);
+
     /* Destroy temporary data structure */
     free(path);