From 1481a4736a4ef7b6a00b67f281c182e56fd82920 Mon Sep 17 00:00:00 2001 From: apio Date: Tue, 8 Aug 2023 13:36:25 +0200 Subject: [PATCH] tmpfs: Update mtime on writes --- kernel/src/fs/tmpfs/Inode.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/kernel/src/fs/tmpfs/Inode.cpp b/kernel/src/fs/tmpfs/Inode.cpp index 08ec9df7..b8ce908d 100644 --- a/kernel/src/fs/tmpfs/Inode.cpp +++ b/kernel/src/fs/tmpfs/Inode.cpp @@ -45,6 +45,8 @@ namespace TmpFS inode->did_link(); + m_metadata.mtime = *Timer::realtime_clock(); + return {}; } @@ -61,6 +63,8 @@ namespace TmpFS inode->did_unlink(); + m_metadata.mtime = *Timer::realtime_clock(); + return {}; } @@ -114,6 +118,8 @@ namespace TmpFS m_metadata.size = m_data_buffer.size(); + m_metadata.mtime = *Timer::realtime_clock(); + return length; } @@ -127,6 +133,8 @@ namespace TmpFS m_metadata.size = m_data_buffer.size(); + m_metadata.mtime = *Timer::realtime_clock(); + return {}; }