Lines Matching refs:old_fm
1497 struct ubi_fastmap_layout *new_fm, *old_fm; in ubi_update_fastmap() local
1522 old_fm = ubi->fm; in ubi_update_fastmap()
1537 if (old_fm && old_fm->e[i]) { in ubi_update_fastmap()
1538 ret = erase_block(ubi, old_fm->e[i]->pnum); in ubi_update_fastmap()
1549 new_fm->e[i] = old_fm->e[i]; in ubi_update_fastmap()
1550 old_fm->e[i] = NULL; in ubi_update_fastmap()
1565 if (old_fm && old_fm->e[i]) { in ubi_update_fastmap()
1566 ubi_wl_put_fm_peb(ubi, old_fm->e[i], i, in ubi_update_fastmap()
1567 old_fm->to_be_tortured[i]); in ubi_update_fastmap()
1568 old_fm->e[i] = NULL; in ubi_update_fastmap()
1574 if (old_fm && new_fm->used_blocks < old_fm->used_blocks) { in ubi_update_fastmap()
1575 for (i = new_fm->used_blocks; i < old_fm->used_blocks; i++) { in ubi_update_fastmap()
1576 ubi_wl_put_fm_peb(ubi, old_fm->e[i], i, in ubi_update_fastmap()
1577 old_fm->to_be_tortured[i]); in ubi_update_fastmap()
1578 old_fm->e[i] = NULL; in ubi_update_fastmap()
1586 if (old_fm) { in ubi_update_fastmap()
1589 ret = erase_block(ubi, old_fm->e[0]->pnum); in ubi_update_fastmap()
1600 new_fm->e[0] = old_fm->e[0]; in ubi_update_fastmap()
1602 old_fm->e[0] = NULL; in ubi_update_fastmap()
1605 ubi_wl_put_fm_peb(ubi, old_fm->e[0], 0, in ubi_update_fastmap()
1606 old_fm->to_be_tortured[0]); in ubi_update_fastmap()
1608 old_fm->e[0] = NULL; in ubi_update_fastmap()
1636 kfree(old_fm); in ubi_update_fastmap()
1647 return_fm_pebs(ubi, old_fm); in ubi_update_fastmap()