/* ubi_scan_rm_volume - delete scanning information about a volume. @si: scanning information @sv: the volume scanning information to delete  */
void ubi_scan_rm_volume(struct ubi_scan_info *si, struct ubi_scan_volume *sv)
/* ubi_scan_rm_volume - delete scanning information about a volume. @si: scanning information @sv: the volume scanning information to delete  */
void ubi_scan_rm_volume(struct ubi_scan_info *si, struct ubi_scan_volume *sv)
{
	struct rb_node *rb;
	struct ubi_scan_leb *seb;
	dbg_bld("remove scanning information about volume %d", sv->vol_id);
	while ((rb = rb_first(&sv->root))) {
		seb = rb_entry(rb, struct ubi_scan_leb, u.rb);
		rb_erase(&seb->u.rb, &sv->root);
		list_add_tail(&seb->u.list, &si->erase);
	}
	rb_erase(&sv->rb, &si->volumes);
	kfree(sv);
	si->vols_found -= 1;
}