Lines Matching refs:old_fm
1482 struct ubi_fastmap_layout *new_fm, *old_fm; in ubi_update_fastmap() local
1507 old_fm = ubi->fm; in ubi_update_fastmap()
1522 if (old_fm && old_fm->e[i]) { in ubi_update_fastmap()
1523 ret = erase_block(ubi, old_fm->e[i]->pnum); in ubi_update_fastmap()
1534 new_fm->e[i] = old_fm->e[i]; in ubi_update_fastmap()
1535 old_fm->e[i] = NULL; in ubi_update_fastmap()
1550 if (old_fm && old_fm->e[i]) { in ubi_update_fastmap()
1551 ubi_wl_put_fm_peb(ubi, old_fm->e[i], i, in ubi_update_fastmap()
1552 old_fm->to_be_tortured[i]); in ubi_update_fastmap()
1553 old_fm->e[i] = NULL; in ubi_update_fastmap()
1559 if (old_fm && new_fm->used_blocks < old_fm->used_blocks) { in ubi_update_fastmap()
1560 for (i = new_fm->used_blocks; i < old_fm->used_blocks; i++) { in ubi_update_fastmap()
1561 ubi_wl_put_fm_peb(ubi, old_fm->e[i], i, in ubi_update_fastmap()
1562 old_fm->to_be_tortured[i]); in ubi_update_fastmap()
1563 old_fm->e[i] = NULL; in ubi_update_fastmap()
1571 if (old_fm) { in ubi_update_fastmap()
1574 ret = erase_block(ubi, old_fm->e[0]->pnum); in ubi_update_fastmap()
1585 new_fm->e[0] = old_fm->e[0]; in ubi_update_fastmap()
1587 old_fm->e[0] = NULL; in ubi_update_fastmap()
1590 ubi_wl_put_fm_peb(ubi, old_fm->e[0], 0, in ubi_update_fastmap()
1591 old_fm->to_be_tortured[0]); in ubi_update_fastmap()
1593 old_fm->e[0] = NULL; in ubi_update_fastmap()
1621 kfree(old_fm); in ubi_update_fastmap()
1632 return_fm_pebs(ubi, old_fm); in ubi_update_fastmap()