Lines Matching refs:old_fm
1540 struct ubi_fastmap_layout *new_fm, *old_fm; in ubi_update_fastmap() local
1565 old_fm = ubi->fm; in ubi_update_fastmap()
1580 if (old_fm && old_fm->e[i]) { in ubi_update_fastmap()
1581 ret = erase_block(ubi, old_fm->e[i]->pnum); in ubi_update_fastmap()
1592 new_fm->e[i] = old_fm->e[i]; in ubi_update_fastmap()
1593 old_fm->e[i] = NULL; in ubi_update_fastmap()
1608 if (old_fm && old_fm->e[i]) { in ubi_update_fastmap()
1609 ubi_wl_put_fm_peb(ubi, old_fm->e[i], i, in ubi_update_fastmap()
1610 old_fm->to_be_tortured[i]); in ubi_update_fastmap()
1611 old_fm->e[i] = NULL; in ubi_update_fastmap()
1617 if (old_fm && new_fm->used_blocks < old_fm->used_blocks) { in ubi_update_fastmap()
1618 for (i = new_fm->used_blocks; i < old_fm->used_blocks; i++) { in ubi_update_fastmap()
1619 ubi_wl_put_fm_peb(ubi, old_fm->e[i], i, in ubi_update_fastmap()
1620 old_fm->to_be_tortured[i]); in ubi_update_fastmap()
1621 old_fm->e[i] = NULL; in ubi_update_fastmap()
1630 if (old_fm) { in ubi_update_fastmap()
1633 ret = erase_block(ubi, old_fm->e[0]->pnum); in ubi_update_fastmap()
1644 new_fm->e[0] = old_fm->e[0]; in ubi_update_fastmap()
1646 old_fm->e[0] = NULL; in ubi_update_fastmap()
1649 ubi_wl_put_fm_peb(ubi, old_fm->e[0], 0, in ubi_update_fastmap()
1650 old_fm->to_be_tortured[0]); in ubi_update_fastmap()
1652 old_fm->e[0] = NULL; in ubi_update_fastmap()
1678 kfree(old_fm); in ubi_update_fastmap()
1692 return_fm_pebs(ubi, old_fm); in ubi_update_fastmap()