Fixed a very stupid bug I introduced in r10056 (the Haiku-only switch):
CachedNode::Allocate() could return the wrong offset for the new node when taken from the free node pool (it accidently returned the offset for the next free node...). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14084 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -294,12 +294,12 @@ CachedNode::Allocate(Transaction &transaction, bplustree_node **_node, off_t *_o
|
|||||||
if (header == NULL)
|
if (header == NULL)
|
||||||
return B_IO_ERROR;
|
return B_IO_ERROR;
|
||||||
|
|
||||||
|
*_offset = header->FreeNode();
|
||||||
|
*_node = fNode;
|
||||||
|
|
||||||
// set new free node pointer
|
// set new free node pointer
|
||||||
header->free_node_pointer = fNode->left_link;
|
header->free_node_pointer = fNode->left_link;
|
||||||
fNode->Initialize();
|
fNode->Initialize();
|
||||||
|
|
||||||
*_offset = header->FreeNode();
|
|
||||||
*_node = fNode;
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user