Kernel: Call did_modify_contents() after truncate()

Truncating a file should absolutly mark it as modified. With this
change our `tail` implementation can correctly handle it.
This commit is contained in:
Fabian Dellwing 2024-02-12 20:25:34 +01:00 committed by Andrew Kaster
commit 5180e41918
Notes: sideshowbarker 2024-07-16 23:59:28 +09:00
3 changed files with 3 additions and 0 deletions

View file

@ -380,6 +380,7 @@ ErrorOr<void> RAMFSInode::truncate(u64 size)
}
m_metadata.size = size;
set_metadata_dirty(true);
did_modify_contents();
return {};
}