diff --git a/VirtualFileSystem/Ext2FileSystem.cpp b/VirtualFileSystem/Ext2FileSystem.cpp index 9031e6c8e8..4ac053f22a 100644 --- a/VirtualFileSystem/Ext2FileSystem.cpp +++ b/VirtualFileSystem/Ext2FileSystem.cpp @@ -650,13 +650,6 @@ bool Ext2FS::write_ext2_inode(unsigned inode, const ext2_inode& e2inode) return true; } -bool Ext2FS::is_directory_inode(unsigned inode) const -{ - if (auto e2inode = lookup_ext2_inode(inode)) - return isDirectory(e2inode->i_mode); - return false; -} - Vector Ext2FS::allocate_blocks(unsigned group, unsigned count) { dbgprintf("Ext2FS: allocateBlocks(group: %u, count: %u)\n", group, count); @@ -840,7 +833,6 @@ bool Ext2FS::set_block_allocation_state(GroupIndex group, BlockIndex bi, bool ne InodeIdentifier Ext2FS::create_directory(InodeIdentifier parentInode, const String& name, Unix::mode_t mode, int& error) { ASSERT(parentInode.fsid() == id()); - ASSERT(is_directory_inode(parentInode.index())); // Fix up the mode to definitely be a directory. // FIXME: This is a bit on the hackish side. @@ -880,7 +872,6 @@ InodeIdentifier Ext2FS::create_directory(InodeIdentifier parentInode, const Stri InodeIdentifier Ext2FS::create_inode(InodeIdentifier parentInode, const String& name, Unix::mode_t mode, unsigned size, int& error) { ASSERT(parentInode.fsid() == id()); - ASSERT(is_directory_inode(parentInode.index())); dbgprintf("Ext2FS: Adding inode '%s' (mode %u) to parent directory %u:\n", name.characters(), mode, parentInode.index()); diff --git a/VirtualFileSystem/Ext2FileSystem.h b/VirtualFileSystem/Ext2FileSystem.h index 5469c513b3..3442047bff 100644 --- a/VirtualFileSystem/Ext2FileSystem.h +++ b/VirtualFileSystem/Ext2FileSystem.h @@ -77,7 +77,6 @@ private: virtual InodeIdentifier find_parent_of_inode(InodeIdentifier) const override; virtual RetainPtr get_inode(InodeIdentifier) const override; - bool is_directory_inode(unsigned) const; unsigned allocate_inode(unsigned preferredGroup, unsigned expectedSize); Vector allocate_blocks(unsigned group, unsigned count); unsigned group_index_from_inode(unsigned) const;