]> git.tuebingen.mpg.de Git - paraslash.git/commit
btr: splice-out fix.
authorAndre Noll <maan@systemlinux.org>
Fri, 6 Sep 2013 23:21:44 +0000 (23:21 +0000)
committerAndre Noll <maan@systemlinux.org>
Sun, 22 Sep 2013 00:10:27 +0000 (02:10 +0200)
commit04d97d1a3a811a2e7eec75da093afdbc4045956c
tree6d321aa28bef058bdf8859e821bfb0ae95bb3d10
parent00e0ee291a22f52d1bbeedfcc7224faf36988031
btr: splice-out fix.

When splicing out a node we set the ->parent pointer of all child
nodes to the parent of the given node, and move each child to the
->children list of the parent.

Except when there is no parent. If the given node was a root node
(or an internal node whose parent vanished), we leave the ->children
list untouched. In this case the assertion a few lines later triggers
and aborts the program. Fix this by removing the nodes from the list.
Such nodes have become root nodes themselves, so they should not be
on any list of children.
buffer_tree.c