From a3f41fd4d925e8da2a13ec7de7c15afadbfa302c Mon Sep 17 00:00:00 2001 From: Bananymous Date: Sun, 3 Nov 2024 20:27:12 +0200 Subject: [PATCH] Kernel: Cleanup disk cache Add missing include and cleanup code calling automatic disk sync. --- kernel/include/kernel/Storage/DiskCache.h | 1 + kernel/kernel/FS/DevFS/FileSystem.cpp | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/kernel/include/kernel/Storage/DiskCache.h b/kernel/include/kernel/Storage/DiskCache.h index a5a79313..24d4129f 100644 --- a/kernel/include/kernel/Storage/DiskCache.h +++ b/kernel/include/kernel/Storage/DiskCache.h @@ -2,6 +2,7 @@ #include #include +#include #include namespace Kernel diff --git a/kernel/kernel/FS/DevFS/FileSystem.cpp b/kernel/kernel/FS/DevFS/FileSystem.cpp index 6a9d5c86..29b8ca53 100644 --- a/kernel/kernel/FS/DevFS/FileSystem.cpp +++ b/kernel/kernel/FS/DevFS/FileSystem.cpp @@ -87,10 +87,7 @@ namespace Kernel while (true) { SystemTimer::get().sleep_ms(10'000); - - LockGuard _(s_instance->m_device_lock); - s_instance->m_should_sync = true; - s_instance->m_sync_thread_blocker.unblock(); + s_instance->initiate_sync(false); } }, nullptr, sync_process )));