1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:58:11 +00:00

Kernel: Remove unused Inode::preopen_fd()

This commit is contained in:
Andreas Kling 2021-12-05 10:49:21 +01:00
parent 20b6ffef4f
commit 0f9ca51c76
2 changed files with 1 additions and 7 deletions

View file

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

View file

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