struct ext2fs_rb_private {
struct rb_root root;
- struct bmap_rb_extent **wcursor;
- struct bmap_rb_extent **rcursor;
+ struct bmap_rb_extent *wcursor;
+ struct bmap_rb_extent *rcursor;
+ struct bmap_rb_extent *rcursor_next;
-#ifdef BMAP_STATS_OPS
+#ifdef ENABLE_BMAP_STATS_OPS
__u64 mark_hit;
__u64 test_hit;
#endif
return retval;
bp->root = RB_ROOT;
- retval = ext2fs_get_mem(sizeof(struct bmap_rb_extent *), &bp->rcursor);
- if (retval)
- return retval;
- retval = ext2fs_get_mem(sizeof(struct bmap_rb_extent *), &bp->wcursor);
- if (retval)
- return retval;
- *bp->rcursor = NULL;
- *bp->wcursor = NULL;
+ bp->rcursor = NULL;
+ bp->rcursor_next = NULL;
+ bp->wcursor = NULL;
-#ifdef BMAP_STATS_OPS
+#ifdef ENABLE_BMAP_STATS_OPS
bp->test_hit = 0;
bp->mark_hit = 0;
#endif
bp = (struct ext2fs_rb_private *) bitmap->private;
rb_free_tree(&bp->root);
- *bp->rcursor = NULL;
- *bp->wcursor = NULL;
+ bp->rcursor = NULL;
+ bp->rcursor_next = NULL;
+ bp->wcursor = NULL;
}
-#ifdef BMAP_STATS
+#ifdef ENABLE_BMAP_STATS
static void rb_print_stats(ext2fs_generic_bitmap bitmap)
{
struct ext2fs_rb_private *bp;