mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-24 02:09:28 +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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user