mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 14:35:07 +00:00
Kernel: Break retain cycle between Inode and VMObject.
There's no need for an Inode to keep its corresponding VMObject alive. Obviously there are huge benefits to keeping a filesystem cache, but leaking everything is hardly the right strategy. :^)
This commit is contained in:
parent
e1be5a468d
commit
d4ba155711
4 changed files with 9 additions and 9 deletions
|
@ -148,7 +148,7 @@ void FS::sync()
|
|||
}
|
||||
}
|
||||
|
||||
void Inode::set_vmo(RetainPtr<VMObject>&& vmo)
|
||||
void Inode::set_vmo(VMObject& vmo)
|
||||
{
|
||||
m_vmo = move(vmo);
|
||||
m_vmo = vmo.make_weak_ptr();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue