1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 00:07:43 +00:00

Kernel: Remove some unnecessary indirection in InodeFile::mmap()

InodeFile now directly calls Process::allocate_region_with_vmobject()
instead of taking an awkward detour via a special Region constructor.
This commit is contained in:
Andreas Kling 2020-02-28 20:29:14 +01:00
parent 651417a085
commit aa1e209845
5 changed files with 3 additions and 33 deletions

View file

@ -57,7 +57,6 @@ public:
static NonnullOwnPtr<Region> create_user_accessible(const Range&, const StringView& name, u8 access, bool cacheable = true);
static NonnullOwnPtr<Region> create_user_accessible(const Range&, NonnullRefPtr<VMObject>, size_t offset_in_vmobject, const StringView& name, u8 access, bool cacheable = true);
static NonnullOwnPtr<Region> create_user_accessible(const Range&, NonnullRefPtr<Inode>, const StringView& name, u8 access, bool cacheable = true);
static NonnullOwnPtr<Region> create_kernel_only(const Range&, const StringView& name, u8 access, bool cacheable = true);
static NonnullOwnPtr<Region> create_kernel_only(const Range&, NonnullRefPtr<VMObject>, size_t offset_in_vmobject, const StringView& name, u8 access, bool cacheable = true);
@ -163,7 +162,6 @@ public:
// NOTE: These are public so we can make<> them.
Region(const Range&, const String&, u8 access, bool cacheable);
Region(const Range&, NonnullRefPtr<VMObject>, size_t offset_in_vmobject, const String&, u8 access, bool cacheable);
Region(const Range&, NonnullRefPtr<Inode>, const String&, u8 access, bool cacheable);
private:
Bitmap& ensure_cow_map() const;