Otherwise it could be left at an invalid value. When we clear the map,
we know the first free bit is 0.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
memset(al->map, 0, al->map_size * sizeof(unsigned long));
}
+
+ axmap->first_free = 0;
}
void axmap_free(struct axmap *axmap)
axmap->nr_levels = levels;
axmap->levels = smalloc(axmap->nr_levels * sizeof(struct axmap_level));
- axmap->first_free = 0;
for (i = 0; i < axmap->nr_levels; i++) {
struct axmap_level *al = &axmap->levels[i];