1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 19:58:11 +00:00

Kernel: Add some InodeVMObject type assertions in Region::clone()

Let's make sure that we're never cloning shared inode-backed objects
as if they were private, and vice versa.
This commit is contained in:
Andreas Kling 2020-03-01 11:08:28 +01:00
parent 88b334135b
commit 48bbfe51fb
4 changed files with 12 additions and 0 deletions

View file

@ -42,6 +42,8 @@ public:
virtual NonnullRefPtr<VMObject> clone() override;
private:
virtual bool is_shared_inode() const override { return true; }
explicit SharedInodeVMObject(Inode&, size_t);
explicit SharedInodeVMObject(const SharedInodeVMObject&);