Kernel: Update atime/ctime/mtime timestamps atomically

Instead of having three separate APIs (one for each timestamp),
there's now only Inode::update_timestamps() and it takes 3x optional
timestamps. The non-empty timestamps are updated while holding the inode
mutex, and the outside world no longer has to look at intermediate
timestamp states.
This commit is contained in:
Andreas Kling 2022-08-22 13:34:22 +02:00
parent 35b2e9c663
commit 280694bb46
Notes: sideshowbarker 2024-07-17 08:03:52 +09:00
18 changed files with 34 additions and 109 deletions

View file

@ -121,11 +121,6 @@ ErrorOr<void> SysFSInode::chown(UserID, GroupID)
return EPERM;
}
ErrorOr<void> SysFSInode::set_mtime(time_t time)
{
return m_associated_component->set_mtime(time);
}
ErrorOr<void> SysFSInode::truncate(u64 size)
{
return m_associated_component->truncate(size);