diff --git a/Kernel/FileSystem/Ext2FileSystem.cpp b/Kernel/FileSystem/Ext2FileSystem.cpp index d6befa68828..4235078576f 100644 --- a/Kernel/FileSystem/Ext2FileSystem.cpp +++ b/Kernel/FileSystem/Ext2FileSystem.cpp @@ -24,7 +24,6 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include #include #include @@ -1196,7 +1195,7 @@ auto Ext2FS::allocate_blocks(GroupIndex preferred_group_index, size_t count) -> auto& cached_bitmap = *cached_bitmap_or_error.value(); int blocks_in_group = min(blocks_per_group(), super_block().s_blocks_count); - auto block_bitmap = Bitmap::wrap(cached_bitmap.buffer.data(), blocks_in_group); + auto block_bitmap = cached_bitmap.bitmap(blocks_in_group); BlockIndex first_block_in_group = (group_index.value() - 1) * blocks_per_group() + first_block_index().value(); size_t free_region_size = 0; diff --git a/Kernel/FileSystem/Ext2FileSystem.h b/Kernel/FileSystem/Ext2FileSystem.h index 71e6a312738..f1bf4fb106c 100644 --- a/Kernel/FileSystem/Ext2FileSystem.h +++ b/Kernel/FileSystem/Ext2FileSystem.h @@ -26,7 +26,7 @@ #pragma once -#include +#include #include #include #include @@ -185,7 +185,7 @@ private: BlockIndex bitmap_block_index { 0 }; bool dirty { false }; KBuffer buffer; - Bitmap bitmap(u32 blocks_per_group) { return Bitmap::wrap(buffer.data(), blocks_per_group); } + BitmapView bitmap(u32 blocks_per_group) { return BitmapView { buffer.data(), blocks_per_group }; } }; KResultOr get_bitmap_block(BlockIndex); diff --git a/Kernel/Heap/Heap.h b/Kernel/Heap/Heap.h index 2bf8bf99801..f5c82f402ca 100644 --- a/Kernel/Heap/Heap.h +++ b/Kernel/Heap/Heap.h @@ -26,7 +26,7 @@ #pragma once -#include +#include #include #include #include @@ -52,7 +52,7 @@ public: Heap(u8* memory, size_t memory_size) : m_total_chunks(calculate_chunks(memory_size)) , m_chunks(memory) - , m_bitmap(Bitmap::wrap(memory + m_total_chunks * CHUNK_SIZE, m_total_chunks)) + , m_bitmap(memory + m_total_chunks * CHUNK_SIZE, m_total_chunks) { // To keep the alignment of the memory passed in, place the bitmap // at the end of the memory block. @@ -170,7 +170,7 @@ private: size_t m_total_chunks { 0 }; size_t m_allocated_chunks { 0 }; u8* m_chunks { nullptr }; - Bitmap m_bitmap; + BitmapView m_bitmap; }; template