One more addition. If we delete the last entry in the root inode, we need to set the depth of the tree to 0. - Ted diff --git a/lib/ext2fs/extent.c b/lib/ext2fs/extent.c index 19d7feb..65b2003 100644 --- a/lib/ext2fs/extent.c +++ b/lib/ext2fs/extent.c @@ -1248,7 +1248,8 @@ errcode_t ext2fs_extent_delete(ext2_extent_handle_t handle, int flags) } else { eh = (struct ext3_extent_header *) path->buf; eh->eh_entries = ext2fs_cpu_to_le16(path->entries); - + if ((path->entries == 0) && (handle->level == 0)) + eh->eh_depth = handle->max_depth = 0; retval = update_path(handle); } return retval; -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html