summaryrefslogtreecommitdiff
path: root/Kernel/FileSystem/Ext2FileSystem.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-08-06 22:25:00 +0200
committerAndreas Kling <kling@serenityos.org>2021-08-06 22:25:00 +0200
commit2cd8b21974993052fdcb0bddfa62423dbeb6002a (patch)
tree25a7b2de5cf157d17ae71224cf3ae3ee3574959c /Kernel/FileSystem/Ext2FileSystem.cpp
parent47bdd7c3a01b7e21e56a5d1dd40b18e9ed43f466 (diff)
downloadserenity-2cd8b21974993052fdcb0bddfa62423dbeb6002a.zip
Kernel: Add convenience values to the Memory::Region::Access enum
Instead of `Memory::Region::Access::Read | Memory::Region::AccessWrite` you can now say `Memory::Region::Access::ReadWrite`.
Diffstat (limited to 'Kernel/FileSystem/Ext2FileSystem.cpp')
-rw-r--r--Kernel/FileSystem/Ext2FileSystem.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/FileSystem/Ext2FileSystem.cpp b/Kernel/FileSystem/Ext2FileSystem.cpp
index 00f20c085b..20876dc21d 100644
--- a/Kernel/FileSystem/Ext2FileSystem.cpp
+++ b/Kernel/FileSystem/Ext2FileSystem.cpp
@@ -132,7 +132,7 @@ bool Ext2FS::initialize()
auto blocks_to_read = ceil_div(m_block_group_count * sizeof(ext2_group_desc), block_size());
BlockIndex first_block_of_bgdt = block_size() == 1024 ? 2 : 1;
- m_cached_group_descriptor_table = KBuffer::try_create_with_size(block_size() * blocks_to_read, Memory::Region::Access::Read | Memory::Region::Access::Write, "Ext2FS: Block group descriptors");
+ m_cached_group_descriptor_table = KBuffer::try_create_with_size(block_size() * blocks_to_read, Memory::Region::Access::ReadWrite, "Ext2FS: Block group descriptors");
if (!m_cached_group_descriptor_table) {
dbgln("Ext2FS: Failed to allocate memory for group descriptor table");
return false;
@@ -1505,7 +1505,7 @@ KResultOr<Ext2FS::CachedBitmap*> Ext2FS::get_bitmap_block(BlockIndex bitmap_bloc
return cached_bitmap;
}
- auto block = KBuffer::try_create_with_size(block_size(), Memory::Region::Access::Read | Memory::Region::Access::Write, "Ext2FS: Cached bitmap block");
+ auto block = KBuffer::try_create_with_size(block_size(), Memory::Region::Access::ReadWrite, "Ext2FS: Cached bitmap block");
if (!block)
return ENOMEM;
auto buffer = UserOrKernelBuffer::for_kernel_buffer(block->data());