From 5cb190eda296ba1f5b0ca1d3933eadb27f77f0af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Wed, 8 Jun 2011 18:29:01 +0000 Subject: [PATCH] * Remove the entry from the entry cache as well when removing a bad inode. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42057 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp b/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp index bac15edd38..989d5c57ed 100644 --- a/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp +++ b/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp @@ -1575,10 +1575,10 @@ status_t 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 @@ BlockAllocator::_RemoveInvalidNode(Inode* parent, BPlusTree* tree, Inode* inode, 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; }