1
0
Fork 0
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:
Jonas 'Sortie' Termansen 2015-10-08 15:55:30 +02:00
parent 4ad93ec618
commit 82775c4803

View file

@ -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;
}