TmpFS: Set the root inode's timestamp to the current time

cc @bcoles :^)
This commit is contained in:
Andreas Kling 2020-11-14 10:44:47 +01:00
commit abe9cec612
Notes: sideshowbarker 2024-07-19 02:28:39 +09:00

View file

@ -114,6 +114,10 @@ NonnullRefPtr<TmpFSInode> TmpFSInode::create(TmpFS& fs, InodeMetadata metadata,
NonnullRefPtr<TmpFSInode> TmpFSInode::create_root(TmpFS& fs)
{
InodeMetadata metadata;
auto now = kgettimeofday();
metadata.atime = now.tv_sec;
metadata.ctime = now.tv_sec;
metadata.mtime = now.tv_sec;
metadata.mode = S_IFDIR | S_ISVTX | 0777;
return create(fs, metadata, { fs.fsid(), 1 });
}