1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 11:04:59 +00:00

Kernel: Make block-based file system code 64 bit ready

This commit is contained in:
Jean-Baptiste Boric 2021-03-18 22:58:21 +01:00 committed by Andreas Kling
parent 6698fd84ff
commit eea5a5ed5d
3 changed files with 32 additions and 32 deletions

View file

@ -235,7 +235,7 @@ KResult BlockBasedFS::read_block(BlockIndex index, UserOrKernelBuffer* buffer, s
if (!allow_cache) {
const_cast<BlockBasedFS*>(this)->flush_specific_block_if_needed(index);
size_t base_offset = index.value() * block_size() + offset;
auto base_offset = index.value() * block_size() + offset;
file_description().seek(base_offset, SEEK_SET);
auto nread = file_description().read(*buffer, count);
if (nread.is_error())
@ -246,7 +246,7 @@ KResult BlockBasedFS::read_block(BlockIndex index, UserOrKernelBuffer* buffer, s
auto& entry = cache().get(index);
if (!entry.has_data) {
size_t base_offset = index.value() * block_size();
auto base_offset = index.value() * block_size();
file_description().seek(base_offset, SEEK_SET);
auto entry_data_buffer = UserOrKernelBuffer::for_kernel_buffer(entry.data);
auto nread = file_description().read(entry_data_buffer, block_size());