mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
Kernel: Use divide_rounded_up inside write_block_list_for_inode
This commit is contained in:
parent
869b33d6dd
commit
9ce0639383
Notes:
sideshowbarker
2024-07-18 22:21:20 +09:00
Author: https://github.com/boricj
Commit: 9ce0639383
Pull-request: https://github.com/SerenityOS/serenity/pull/5332
1 changed files with 1 additions and 3 deletions
|
@ -339,9 +339,7 @@ KResult Ext2FS::write_block_list_for_inode(InodeIndex inode_index, ext2_inode& e
|
|||
remaining_blocks -= new_shape.doubly_indirect_blocks;
|
||||
output_block_index += new_shape.doubly_indirect_blocks;
|
||||
} else {
|
||||
unsigned indirect_block_count = new_shape.doubly_indirect_blocks / entries_per_block;
|
||||
if ((new_shape.doubly_indirect_blocks % entries_per_block) != 0)
|
||||
indirect_block_count++;
|
||||
unsigned indirect_block_count = divide_rounded_up(new_shape.doubly_indirect_blocks, entries_per_block);
|
||||
|
||||
auto dind_block_contents = ByteBuffer::create_uninitialized(block_size());
|
||||
if (dind_block_new) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue