mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Fix extfs invalid block free on truncation.
This commit is contained in:
parent
4ad93ec618
commit
82775c4803
1 changed files with 2 additions and 0 deletions
|
@ -372,6 +372,8 @@ void Inode::Truncate(uint64_t new_size)
|
|||
|
||||
for ( uint64_t i = new_num_blocks; i < old_num_blocks && i < 12; i++ )
|
||||
{
|
||||
if ( !data->i_block[i] )
|
||||
continue;
|
||||
filesystem->FreeBlock(data->i_block[i]);
|
||||
data->i_block[i] = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue