-/* Iterate through each @child dentry of the @parent inode,
- * in postorder (safe for freeing). */
-#define for_inode_child_postorder(child, parent) \
- for (struct rb_node *_tmp = rb_first_postorder(&parent->i_children), *_parent; \
- _tmp && \
- ((child = rb_entry(_tmp, struct wim_dentry, rb_node)), 1) && \
- ((_parent = rb_parent(_tmp)), 1); \
- _tmp = rb_next_postorder(_tmp, _parent))
+/* Iterate through each @child dentry of the @dir directory inode,
+ * in postorder (safe for freeing the child dentries). */
+#define for_inode_child_postorder(child, dir) \
+ avl_tree_for_each_in_postorder((child), (dir)->i_children, \
+ struct wim_dentry, d_index_node)