]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/hfs/hfscommon/BTree/BTreeAllocate.c
xnu-517.tar.gz
[apple/xnu.git] / bsd / hfs / hfscommon / BTree / BTreeAllocate.c
index 557cd19cf299c405d64b099163b57da1c6c1b8c3..e08170ee133fb606bf1f37c8964fa14876f07629 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000-2003 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
@@ -193,6 +193,10 @@ OSStatus   AllocateNode (BTreeControlBlockPtr              btreePtr, UInt32        *nodeNum)
        
        --btreePtr->freeNodes;
        btreePtr->flags |= kBTHeaderDirty;
+       
+       /* Account for allocations from node reserve */
+       BTUpdateReserve(btreePtr, 1);
+
        *nodeNum = nodeNumber;
        
        return noErr;