On Mon 04-11-13 15:26:38, Jan Kara wrote:On Fri 01-11-13 15:38:50, Cody P Schafer wrote:Hum, except that the kernel oopses with this patch. And I think theUse rbtree_postorder_for_each_entry_safe() to destroy the rbtree insteadThanks. I've merged the patch into my tree.
of opencoding an alternate postorder iteration that modifies the tree
problem is in rbtree_postorder_for_each_entry_safe(). How are those tests
for NULL supposed to work? For example if the tree is empty, 'pos' will be
NULL and you'll call rb_next_postorder(&NULL->field) which is pretty much
guaranteed to oops if 'field' doesn't have offset 0 in the structure...