diff options
author | Andreas Kling <kling@serenityos.org> | 2021-12-05 10:49:21 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-12-06 19:22:16 +0100 |
commit | 0f9ca51c7625d66c2728f8837af1eafd614bae0a (patch) | |
tree | 45770ba10e9aa61b46e2dd3ee9ba07c88ab104bb | |
parent | 20b6ffef4f92a7040c68b933018114d86a9ca768 (diff) | |
download | serenity-0f9ca51c7625d66c2728f8837af1eafd614bae0a.zip |
Kernel: Remove unused Inode::preopen_fd()
-rw-r--r-- | Kernel/FileSystem/Inode.h | 2 | ||||
-rw-r--r-- | Kernel/FileSystem/VirtualFileSystem.cpp | 6 |
2 files changed, 1 insertions, 7 deletions
diff --git a/Kernel/FileSystem/Inode.h b/Kernel/FileSystem/Inode.h index 85a8cae66c..acc58eee7a 100644 --- a/Kernel/FileSystem/Inode.h +++ b/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); diff --git a/Kernel/FileSystem/VirtualFileSystem.cpp b/Kernel/FileSystem/VirtualFileSystem.cpp index b23fd30cd7..1c104efe4c 100644 --- a/Kernel/FileSystem/VirtualFileSystem.cpp +++ b/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; |