[prev in list] [next in list] [prev in thread] [next in thread]
List: haiku-commits
Subject: [haiku-commits] haiku: hrev43918 - src/add-ons/kernel/file_systems/bfs
From: axeld () pinc-software ! de
Date: 2012-03-31 15:02:05
Message-ID: 20120331150205.7A4E05C0728 () vmrepo ! haiku-os ! org
[Download RAW message or body]
hrev43918 adds 1 changeset to branch 'master'
old head: e0927e2c4414f9e43ca84b4332c3b69ae6242ba9
new head: cb8941c48f7eeff3b6b0c0ac963569febb54b30c
----------------------------------------------------------------------------
cb8941c: We must not check the node here.
* The node might not be a normal tree node, so we must not check it before
writing.
* Also, it's always a good idea to check if the function you called didn't
succeed.
* This fixes a crashing bug when running checkfs in some rare circumstances.
[ Axel Dörfler <axeld@pinc-software.de> ]
----------------------------------------------------------------------------
Revision: hrev43918
Commit: cb8941c48f7eeff3b6b0c0ac963569febb54b30c
URL: http://cgit.haiku-os.org/haiku/commit/?id=cb8941c
Author: Axel Dörfler <axeld@pinc-software.de>
Date: Sat Mar 31 15:00:02 2012 UTC
----------------------------------------------------------------------------
1 files changed, 4 insertions(+), 1 deletions(-)
src/add-ons/kernel/file_systems/bfs/BPlusTree.cpp | 5 ++++-
----------------------------------------------------------------------------
diff --git a/src/add-ons/kernel/file_systems/bfs/BPlusTree.cpp \
b/src/add-ons/kernel/file_systems/bfs/BPlusTree.cpp index 18c7aa1..d503e85 100644
--- a/src/add-ons/kernel/file_systems/bfs/BPlusTree.cpp
+++ b/src/add-ons/kernel/file_systems/bfs/BPlusTree.cpp
@@ -776,7 +776,10 @@ BPlusTree::MakeEmpty()
= HOST_ENDIAN_TO_BFS_INT64((uint64)BPLUSTREE_NULL);
}
- bplustree_node* node = cached.SetToWritable(transaction, NodeSize());
+ bplustree_node* node = cached.SetToWritable(transaction, NodeSize(), false);
+ if (node == NULL)
+ return B_IO_ERROR;
+
node->left_link = HOST_ENDIAN_TO_BFS_INT64((uint64)BPLUSTREE_NULL);
node->right_link = HOST_ENDIAN_TO_BFS_INT64((uint64)BPLUSTREE_NULL);
node->overflow_link = HOST_ENDIAN_TO_BFS_INT64((uint64)BPLUSTREE_NULL);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic