mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:07:44 +00:00
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:
parent
35b2e9c663
commit
280694bb46
18 changed files with 34 additions and 109 deletions
|
@ -359,9 +359,7 @@ public:
|
|||
virtual ErrorOr<void> chmod(mode_t) override;
|
||||
virtual ErrorOr<void> chown(UserID, GroupID) override;
|
||||
virtual ErrorOr<void> truncate(u64) override;
|
||||
virtual ErrorOr<void> set_atime(time_t) override;
|
||||
virtual ErrorOr<void> set_ctime(time_t) override;
|
||||
virtual ErrorOr<void> set_mtime(time_t) override;
|
||||
virtual ErrorOr<void> update_timestamps(Optional<time_t> atime, Optional<time_t> ctime, Optional<time_t> mtime) override;
|
||||
|
||||
private:
|
||||
// HACK: The base ISO 9660 standard says the maximum filename length is 37
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue