summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-11-14 10:44:47 +0100
committerAndreas Kling <kling@serenityos.org>2020-11-14 10:44:47 +0100
commitabe9cec612bf95f76451beb8e7bdc7f9c7edb0b3 (patch)
tree1cfacef7ccc85e2a85a8049b1530e4f546ff62ba
parent117274663390395d9ac990b1b69a08f4a8eafba5 (diff)
downloadserenity-abe9cec612bf95f76451beb8e7bdc7f9c7edb0b3.zip
TmpFS: Set the root inode's timestamp to the current time
cc @bcoles :^)
-rw-r--r--Kernel/FileSystem/TmpFS.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Kernel/FileSystem/TmpFS.cpp b/Kernel/FileSystem/TmpFS.cpp
index 54f2b77d09..4b3de115e3 100644
--- a/Kernel/FileSystem/TmpFS.cpp
+++ b/Kernel/FileSystem/TmpFS.cpp
@@ -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 });
}