Comments
Patch
@@ -1310,7 +1310,6 @@ int ubi_update_fastmap(struct ubi_device *ubi)
}
new_fm->e[0]->pnum = old_fm->e[0]->pnum;
- new_fm->e[0]->ec = old_fm->e[0]->ec;
} else {
/* we've got a new early PEB, return the old one */
ubi_wl_put_fm_peb(ubi, old_fm->e[0], 0);
@@ -1326,9 +1325,10 @@ int ubi_update_fastmap(struct ubi_device *ubi)
goto err;
}
- new_fm->e[0]->ec = get_ec(ubi, new_fm->e[0]->pnum);
}
+ new_fm->e[0]->ec = get_ec(ubi, new_fm->e[0]->pnum);
+
if (new_fm->used_blocks > UBI_FM_MAX_BLOCKS) {
ubi_err("fastmap too large");
ret = -ENOSPC;
Signed-off-by: Richard Weinberger <richard@nod.at> --- drivers/mtd/ubi/fastmap.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)