mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 23:09:08 +00:00
Revert "Ext2FS: Don't reload already-cached block list when freeing inode"
This reverts commit 1e737a5c50
.
The cached block list does not include meta-blocks, so we'd end up
leaking those. There's definitely a nice way to avoid work here, but it
turns out it wasn't quite this trivial. Reverting for now.
This commit is contained in:
parent
79889ef052
commit
65e083ed36
Notes:
sideshowbarker
2024-07-18 21:54:38 +09:00
Author: https://github.com/awesomekling
Commit: 65e083ed36
1 changed files with 2 additions and 4 deletions
|
@ -543,10 +543,8 @@ void Ext2FS::free_inode(Ext2FSInode& inode)
|
|||
dbgln_if(EXT2_DEBUG, "Ext2FS: Inode {} has no more links, time to delete!", inode.index());
|
||||
|
||||
// Mark all blocks used by this inode as free.
|
||||
if (inode.m_block_list.is_empty())
|
||||
inode.m_block_list = block_list_for_inode(inode.m_raw_inode, true);
|
||||
|
||||
for (auto block_index : inode.m_block_list) {
|
||||
auto block_list = block_list_for_inode(inode.m_raw_inode, true);
|
||||
for (auto block_index : block_list) {
|
||||
VERIFY(block_index <= super_block().s_blocks_count);
|
||||
if (block_index.value()) {
|
||||
auto result = set_block_allocation_state(block_index, false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue