From 105eeb9c848f63c5e8c18ceff9180383f5977229 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Sun, 7 Aug 2011 14:53:10 +0000 Subject: [PATCH] When checkfs stop checking, the block allocator tries to write more blocks than present in fCheckBitmap, so we constrain it to fNumBlocks. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42594 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp b/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp index 257fb3d872..e4643667d4 100644 --- a/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp +++ b/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp @@ -1326,6 +1326,8 @@ BlockAllocator::StopChecking(check_control* control) int32 blocksInBitmap = fNumGroups * fBlocksPerGroup; size_t blockSize = fVolume->BlockSize(); + if (blocksInBitmap > (int32)fNumBlocks) + blocksInBitmap = fNumBlocks; for (int32 i = 0; i < blocksInBitmap; i += 512) { Transaction transaction(fVolume, 1 + i);