diff options
author | marprok <mariosprokopakis@gmail.com> | 2020-03-11 23:06:17 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-03-12 12:35:00 +0100 |
commit | 3cbc2f438186031ccf71b02869ab26bcd1f49ecd (patch) | |
tree | 87897daa9ac649a6c1bf409a9a0e16733f110986 | |
parent | 673848f472f43a481d684d18fabc52b4958d6018 (diff) | |
download | serenity-3cbc2f438186031ccf71b02869ab26bcd1f49ecd.zip |
Ext2FS: Reset the found_a_group flag
-rw-r--r-- | Kernel/FileSystem/Ext2FileSystem.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Kernel/FileSystem/Ext2FileSystem.cpp b/Kernel/FileSystem/Ext2FileSystem.cpp index 179b041c4b..cc247457d6 100644 --- a/Kernel/FileSystem/Ext2FileSystem.cpp +++ b/Kernel/FileSystem/Ext2FileSystem.cpp @@ -1064,7 +1064,6 @@ Vector<Ext2FS::BlockIndex> Ext2FS::allocate_blocks(GroupIndex preferred_group_in #endif blocks.ensure_capacity(count); - bool found_a_group = false; GroupIndex group_index = preferred_group_index; if (!group_descriptor(preferred_group_index).bg_free_blocks_count) { @@ -1072,6 +1071,8 @@ Vector<Ext2FS::BlockIndex> Ext2FS::allocate_blocks(GroupIndex preferred_group_in } while (blocks.size() < count) { + + bool found_a_group = false; if (group_descriptor(group_index).bg_free_blocks_count) { found_a_group = true; } else { @@ -1084,6 +1085,7 @@ Vector<Ext2FS::BlockIndex> Ext2FS::allocate_blocks(GroupIndex preferred_group_in } } } + ASSERT(found_a_group); auto& bgd = group_descriptor(group_index); auto& cached_bitmap = get_bitmap_block(bgd.bg_block_bitmap); |