mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 20:17:13 +02:00
Ext2FS: Reset the found_a_group flag
This commit is contained in:
Notes:
sideshowbarker
2024-07-19 08:45:38 +09:00
Author: https://github.com/marprok Commit: https://github.com/SerenityOS/serenity/commit/3cbc2f43818 Pull-request: https://github.com/SerenityOS/serenity/pull/1420
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user