mirror of
https://github.com/SerenityOS/serenity
synced 2026-05-10 09:02:44 +02:00
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.
4.5 KiB
4.5 KiB