Don't use null node when repairing aug

We were derefing the null parent when deleting a single node in a tree.
There's no need to use parent_ref() here, we know that there's no node
and we can just clear the root's aug bits.

Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
Zach Brown
2017-01-09 14:25:31 -08:00
parent cd6cd000ce
commit e5e7a25ecd

View File

@@ -217,7 +217,7 @@ static void update_internal_aug(struct scoutfs_treap *treap,
u8 bits;
if (!node)
parent_ref(treap, node)->aug_bits = 0;
treap->root_ref.aug_bits = 0;
while (node) {
bits = node_aug_bits(treap, node);