Files
ladybird/VirtualFileSystem/Ext2FileSystem.cpp
Andreas Kling 8f9542174f Ext2FS: Don't cache a full Ext2FSInode object for non-existent inodes.
This was a bit silly. We were always creating Ext2FSInode objects when
Ext2FSInode::get_inode() was called. They'd then sit and fatten up the
inode cache forever, despite not representing allocated inodes.

This patch consults the inode bitmap and if get_inode() is called with
an unallocated inode index, we simply cache a nullptr to represent the
fact that this index is unused.

This could be a lot better optimized, it will currently hit the disk for
every new inode index encountered.
2019-01-01 03:37:27 +01:00

34 KiB