diff --git a/Kernel/FileSystem/VirtualFileSystem.h b/Kernel/FileSystem/VirtualFileSystem.h index 04c46fde2b..555d9705ff 100644 --- a/Kernel/FileSystem/VirtualFileSystem.h +++ b/Kernel/FileSystem/VirtualFileSystem.h @@ -93,7 +93,7 @@ public: InodeIdentifier root_inode_id() const; - void sync(); + static void sync(); Custody& root_custody(); KResultOr> resolve_path(StringView path, Custody& base, RefPtr* out_parent = nullptr, int options = 0, int symlink_recursion_level = 0); diff --git a/Kernel/Syscalls/sync.cpp b/Kernel/Syscalls/sync.cpp index 74647e15cb..fb07fa6d55 100644 --- a/Kernel/Syscalls/sync.cpp +++ b/Kernel/Syscalls/sync.cpp @@ -12,7 +12,7 @@ namespace Kernel { KResultOr Process::sys$sync() { REQUIRE_PROMISE(stdio); - VirtualFileSystem::the().sync(); + VirtualFileSystem::sync(); return 0; } diff --git a/Kernel/Tasks/SyncTask.cpp b/Kernel/Tasks/SyncTask.cpp index 2999f73c79..a5b44aa6f7 100644 --- a/Kernel/Tasks/SyncTask.cpp +++ b/Kernel/Tasks/SyncTask.cpp @@ -18,7 +18,7 @@ UNMAP_AFTER_INIT void SyncTask::spawn() Process::create_kernel_process(syncd_thread, "SyncTask", [] { dbgln("SyncTask is running"); for (;;) { - VirtualFileSystem::the().sync(); + VirtualFileSystem::sync(); (void)Thread::current()->sleep(Time::from_seconds(1)); } });