Kernel: Remove Inode::directory_entry_count()

This was only used in one place: VirtualFileSystem::rmdir(), and that
has now been converted to a simple directory traversal.
This commit is contained in:
Andreas Kling 2021-07-17 22:36:04 +02:00
parent d1bbe8b652
commit b8d6c3722d
Notes: sideshowbarker 2024-07-18 08:51:17 +09:00
15 changed files with 0 additions and 92 deletions

View file

@ -851,20 +851,6 @@ void Plan9FSInode::flush_metadata()
// Do nothing.
}
KResultOr<size_t> Plan9FSInode::directory_entry_count() const
{
size_t count = 0;
KResult result = traverse_as_directory([&count](auto&) {
count++;
return true;
});
if (result.is_error())
return result;
return count;
}
KResult Plan9FSInode::traverse_as_directory(Function<bool(FileSystem::DirectoryEntryView const&)> callback) const
{
KResult result = KSuccess;