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:
Andreas Kling
2019-02-08 16:40:48 +01:00
parent e1be5a468d
commit d4ba155711
4 changed files with 9 additions and 9 deletions

View File

@@ -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();
}