mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 14:58:46 +00:00
Automatically call Inode::flush_metadata() before an Inode is destroyed.
Use a little template magic to have Retainable::release() call out to T::will_be_destroyed() if such a function exists before actually calling the destructor. This gives us full access to virtual functions in the pre-destruction code.
This commit is contained in:
parent
1f44cd9dd9
commit
d0f06e5f3f
Notes:
sideshowbarker
2024-07-19 16:07:58 +09:00
Author: https://github.com/awesomekling
Commit: d0f06e5f3f
6 changed files with 41 additions and 17 deletions
|
@ -317,6 +317,7 @@ void Ext2FSInode::flush_metadata()
|
|||
m_raw_inode.i_dtime = m_metadata.dtime;
|
||||
m_raw_inode.i_blocks = m_metadata.blockCount;
|
||||
fs().write_ext2_inode(index(), m_raw_inode);
|
||||
set_metadata_dirty(false);
|
||||
}
|
||||
|
||||
RetainPtr<Inode> Ext2FS::get_inode(InodeIdentifier inode) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue