Author: axeld Date: 2011-06-08 20:29:01 +0200 (Wed, 08 Jun 2011) New Revision: 42057 Changeset: https://dev.haiku-os.org/changeset/42057 Modified: haiku/trunk/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp Log: * Remove the entry from the entry cache as well when removing a bad inode. Modified: haiku/trunk/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp =================================================================== --- haiku/trunk/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp 2011-06-08 17:39:46 UTC (rev 42056) +++ haiku/trunk/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp 2011-06-08 18:29:01 UTC (rev 42057) @@ -1575,10 +1575,10 @@ BlockAllocator::_RemoveInvalidNode(Inode* parent, BPlusTree* tree, Inode* inode, const char* name) { - // it's safe to start a transaction, because Inode::Remove() + // It's safe to start a transaction, because Inode::Remove() // won't touch the block bitmap (which we hold the lock for) // if we set the INODE_DONT_FREE_SPACE flag - since we fix - // the bitmap anyway + // the bitmap anyway. Transaction transaction(fVolume, parent->BlockNumber()); status_t status; @@ -1596,8 +1596,10 @@ status = tree->Remove(transaction, name, id); } - if (status == B_OK) + if (status == B_OK) { + entry_cache_remove(fVolume->ID(), parent->ID(), name); transaction.Done(); + } return status; }