mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:38:10 +00:00
Ext2FS: Reset the found_a_group flag
This commit is contained in:
parent
673848f472
commit
3cbc2f4381
1 changed files with 3 additions and 1 deletions
|
@ -1064,7 +1064,6 @@ Vector<Ext2FS::BlockIndex> Ext2FS::allocate_blocks(GroupIndex preferred_group_in
|
||||||
#endif
|
#endif
|
||||||
blocks.ensure_capacity(count);
|
blocks.ensure_capacity(count);
|
||||||
|
|
||||||
bool found_a_group = false;
|
|
||||||
GroupIndex group_index = preferred_group_index;
|
GroupIndex group_index = preferred_group_index;
|
||||||
|
|
||||||
if (!group_descriptor(preferred_group_index).bg_free_blocks_count) {
|
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) {
|
while (blocks.size() < count) {
|
||||||
|
|
||||||
|
bool found_a_group = false;
|
||||||
if (group_descriptor(group_index).bg_free_blocks_count) {
|
if (group_descriptor(group_index).bg_free_blocks_count) {
|
||||||
found_a_group = true;
|
found_a_group = true;
|
||||||
} else {
|
} else {
|
||||||
|
@ -1084,6 +1085,7 @@ Vector<Ext2FS::BlockIndex> Ext2FS::allocate_blocks(GroupIndex preferred_group_in
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSERT(found_a_group);
|
ASSERT(found_a_group);
|
||||||
auto& bgd = group_descriptor(group_index);
|
auto& bgd = group_descriptor(group_index);
|
||||||
auto& cached_bitmap = get_bitmap_block(bgd.bg_block_bitmap);
|
auto& cached_bitmap = get_bitmap_block(bgd.bg_block_bitmap);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue