diff --git a/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp b/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp index 78758c5edd..bc1dbf1c6a 100644 --- a/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp +++ b/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp @@ -867,6 +867,11 @@ BlockAllocator::AllocateBlocks(Transaction& transaction, int32 groupIndex, // If the value is not correct at mount time, it will be // fixed anyway. + // We need to flush any remaining blocks in the new allocation to make sure + // they won't interfere with the file cache. + block_cache_discard(fVolume->BlockCache(), fVolume->ToBlock(run), + run.Length()); + T(Allocate(run)); return B_OK; }