From e5e7a25ecd54f1f94e8b119488bfc44a3464da02 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 9 Jan 2017 14:25:31 -0800 Subject: [PATCH] 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 --- kmod/src/treap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kmod/src/treap.c b/kmod/src/treap.c index 85e75add..87ebc4f1 100644 --- a/kmod/src/treap.c +++ b/kmod/src/treap.c @@ -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);