2020-02-28 22:20:35 +03:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
|
|
|
|
*
|
2021-04-22 11:24:48 +03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-02-28 22:20:35 +03:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <Kernel/FileSystem/Inode.h>
|
|
|
|
#include <Kernel/VM/PrivateInodeVMObject.h>
|
|
|
|
|
|
|
|
namespace Kernel {
|
|
|
|
|
2021-05-28 13:18:07 +03:00
|
|
|
RefPtr<PrivateInodeVMObject> PrivateInodeVMObject::create_with_inode(Inode& inode)
|
2020-02-28 22:20:35 +03:00
|
|
|
{
|
2021-05-28 13:18:07 +03:00
|
|
|
return adopt_ref_if_nonnull(new PrivateInodeVMObject(inode, inode.size()));
|
2020-02-28 22:20:35 +03:00
|
|
|
}
|
|
|
|
|
2020-09-05 06:12:25 +03:00
|
|
|
RefPtr<VMObject> PrivateInodeVMObject::clone()
|
2020-02-28 22:20:35 +03:00
|
|
|
{
|
2021-05-28 13:18:07 +03:00
|
|
|
return adopt_ref_if_nonnull(new PrivateInodeVMObject(*this));
|
2020-02-28 22:20:35 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
PrivateInodeVMObject::PrivateInodeVMObject(Inode& inode, size_t size)
|
|
|
|
: InodeVMObject(inode, size)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
PrivateInodeVMObject::PrivateInodeVMObject(const PrivateInodeVMObject& other)
|
|
|
|
: InodeVMObject(other)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
PrivateInodeVMObject::~PrivateInodeVMObject()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|