Index: uspace/lib/ext4/libext4_extent.c
===================================================================
--- uspace/lib/ext4/libext4_extent.c	(revision fa3704ded00cb0310282948a2e68e46e6fe7d813)
+++ uspace/lib/ext4/libext4_extent.c	(revision d0c9b4b13f1b3e0359b91c17272add1187eda334)
@@ -666,5 +666,5 @@
 
 	// If leaf node is empty, the whole tree must be checked and the node will be released
-	bool check_tree = false;
+	bool remove_parent_record = false;
 
 	// Don't release root block (including inode data) !!!
@@ -674,5 +674,5 @@
 			goto cleanup;
 		}
-		check_tree = true;
+		remove_parent_record = true;
 	}
 
@@ -688,10 +688,6 @@
 
 		// Correct entry because of changes in the previous iteration
-		if (check_tree) {
+		if (remove_parent_record) {
 			entries--;
-			ext4_extent_header_set_entries_count(path_ptr->header, entries);
-		} else {
-			// TODO check this condition
-			break;
 		}
 
@@ -704,6 +700,7 @@
 			++index;
 			--entries;
-			ext4_extent_header_set_entries_count(path_ptr->header, entries);
-		}
+		}
+
+		ext4_extent_header_set_entries_count(path_ptr->header, entries);
 
 		path_ptr->block->dirty = true;
@@ -717,7 +714,7 @@
 
 			// Mark parent to be checked
-			check_tree = true;
+			remove_parent_record = true;
 		} else {
-			check_tree = false;
+			remove_parent_record = false;
 		}
 
