[haiku-commits] BRANCH ahenriksson-github.fixes - src/add-ons/kernel/file_systems/bfs

  • From: ahenriksson-github.fixes <community@xxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 10 Jul 2012 20:49:11 +0200 (CEST)

added 1 changeset to branch 'refs/remotes/ahenriksson-github/fixes'
old head: ed481dd71f4c2359735ca3fcf6cf1de6e2e3540a
new head: 86ca32ad0dca509e4ba4d22e9c0bf84810ce7891

----------------------------------------------------------------------------

86ca32a: Forgotten shift in BlockAllocator::CheckBlocks()
  
  Went unnoticed because the function used to always be called with
  start == 0.

                                      [ ahenriksson <sausageboy@xxxxxxxxx> ]

----------------------------------------------------------------------------

Commit:      86ca32ad0dca509e4ba4d22e9c0bf84810ce7891

Author:      ahenriksson <sausageboy@xxxxxxxxx>
Date:        Tue Jul 10 15:39:24 2012 UTC

----------------------------------------------------------------------------

1 file changed, 1 insertion(+), 1 deletion(-)
.../kernel/file_systems/bfs/BlockAllocator.cpp     |    2 +-

----------------------------------------------------------------------------

diff --git a/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp 
b/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp
index 1296c5c..4d23373 100644
--- a/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp
+++ b/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp
@@ -1701,7 +1701,7 @@ BlockAllocator::CheckBlocks(off_t start, off_t length, 
bool allocated)
 
        uint32 group = start >> fVolume->AllocationGroupShift();
        uint32 groupBlock = start / (fVolume->BlockSize() << 3);
-       uint32 blockOffset = start % fVolume->BlockSize();
+       uint32 blockOffset = start % (fVolume->BlockSize() << 3);
 
        AllocationBlock cached(fVolume);
 


Other related posts: