فهرست منبع

Kernel: Remove unused Inode::preopen_fd()

Andreas Kling 3 سال پیش
والد
کامیت
0f9ca51c76
2فایلهای تغییر یافته به همراه1 افزوده شده و 7 حذف شده
  1. 0 2
      Kernel/FileSystem/Inode.h
  2. 1 5
      Kernel/FileSystem/VirtualFileSystem.cpp

+ 0 - 2
Kernel/FileSystem/Inode.h

@@ -71,8 +71,6 @@ public:
     bool bind_socket(LocalSocket&);
     bool unbind_socket();
 
-    virtual OpenFileDescription* preopen_fd() { return nullptr; };
-
     bool is_metadata_dirty() const { return m_metadata_dirty; }
 
     virtual ErrorOr<void> set_atime(time_t);

+ 1 - 5
Kernel/FileSystem/VirtualFileSystem.cpp

@@ -248,9 +248,6 @@ ErrorOr<NonnullRefPtr<OpenFileDescription>> VirtualFileSystem::open(StringView p
             return EACCES;
     }
 
-    if (auto preopen_fd = inode.preopen_fd())
-        return *preopen_fd;
-
     if (metadata.is_fifo()) {
         auto fifo = TRY(inode.fifo());
         if (options & O_WRONLY) {
@@ -282,8 +279,7 @@ ErrorOr<NonnullRefPtr<OpenFileDescription>> VirtualFileSystem::open(StringView p
         return description;
     }
 
-    // Check for read-only FS. Do this after handling preopen FD and devices,
-    // but before modifying the inode in any way.
+    // Check for read-only FS. Do this after handling devices, but before modifying the inode in any way.
     if ((options & O_WRONLY) && custody.is_readonly())
         return EROFS;