Преглед на файлове

Kernel: Make VirtualFileSystem::sync() static

Andreas Kling преди 4 години
родител
ревизия
07c4c89297
променени са 3 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 1 1
      Kernel/FileSystem/VirtualFileSystem.h
  2. 1 1
      Kernel/Syscalls/sync.cpp
  3. 1 1
      Kernel/Tasks/SyncTask.cpp

+ 1 - 1
Kernel/FileSystem/VirtualFileSystem.h

@@ -93,7 +93,7 @@ public:
 
 
     InodeIdentifier root_inode_id() const;
     InodeIdentifier root_inode_id() const;
 
 
-    void sync();
+    static void sync();
 
 
     Custody& root_custody();
     Custody& root_custody();
     KResultOr<NonnullRefPtr<Custody>> resolve_path(StringView path, Custody& base, RefPtr<Custody>* out_parent = nullptr, int options = 0, int symlink_recursion_level = 0);
     KResultOr<NonnullRefPtr<Custody>> resolve_path(StringView path, Custody& base, RefPtr<Custody>* out_parent = nullptr, int options = 0, int symlink_recursion_level = 0);

+ 1 - 1
Kernel/Syscalls/sync.cpp

@@ -12,7 +12,7 @@ namespace Kernel {
 KResultOr<FlatPtr> Process::sys$sync()
 KResultOr<FlatPtr> Process::sys$sync()
 {
 {
     REQUIRE_PROMISE(stdio);
     REQUIRE_PROMISE(stdio);
-    VirtualFileSystem::the().sync();
+    VirtualFileSystem::sync();
     return 0;
     return 0;
 }
 }
 
 

+ 1 - 1
Kernel/Tasks/SyncTask.cpp

@@ -18,7 +18,7 @@ UNMAP_AFTER_INIT void SyncTask::spawn()
     Process::create_kernel_process(syncd_thread, "SyncTask", [] {
     Process::create_kernel_process(syncd_thread, "SyncTask", [] {
         dbgln("SyncTask is running");
         dbgln("SyncTask is running");
         for (;;) {
         for (;;) {
-            VirtualFileSystem::the().sync();
+            VirtualFileSystem::sync();
             (void)Thread::current()->sleep(Time::from_seconds(1));
             (void)Thread::current()->sleep(Time::from_seconds(1));
         }
         }
     });
     });