/* * Copyright (c) 2018-2020, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include namespace Kernel::Memory { class SharedInodeVMObject final : public InodeVMObject { AK_MAKE_NONMOVABLE(SharedInodeVMObject); public: static ErrorOr> try_create_with_inode(Inode&); virtual ErrorOr> try_clone() override; ErrorOr sync(off_t offset_in_pages = 0, size_t pages = -1); private: virtual bool is_shared_inode() const override { return true; } explicit SharedInodeVMObject(Inode&, FixedArray>&&); explicit SharedInodeVMObject(SharedInodeVMObject const&, FixedArray>&&); virtual StringView class_name() const override { return "SharedInodeVMObject"sv; } SharedInodeVMObject& operator=(SharedInodeVMObject const&) = delete; }; }