aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2013-08-19 22:31:49 +0200
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2013-08-20 17:53:25 +0300
commit8930fa500f55215f0211db9b78255e727ac3f282 (patch)
treed42b70f388fa4c56bcfb821b026f7312b18d86ff /drivers/mtd
parent5ef4414f4bc26a19cfd5cd11aee9697a863e4d51 (diff)
downloadkernel_goldelico_gta04-8930fa500f55215f0211db9b78255e727ac3f282.zip
kernel_goldelico_gta04-8930fa500f55215f0211db9b78255e727ac3f282.tar.gz
kernel_goldelico_gta04-8930fa500f55215f0211db9b78255e727ac3f282.tar.bz2
UBI: Fix invalidate_fastmap()
Onging tests uncovered that invalidate_fastmap() is broken. It must not call ubi_wl_put_fm_peb() because all PEBs used by the old fastmap have already been put back. Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/ubi/fastmap.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/mtd/ubi/fastmap.c b/drivers/mtd/ubi/fastmap.c
index 1542751..f5aa4b0 100644
--- a/drivers/mtd/ubi/fastmap.c
+++ b/drivers/mtd/ubi/fastmap.c
@@ -1343,7 +1343,7 @@ out:
static int invalidate_fastmap(struct ubi_device *ubi,
struct ubi_fastmap_layout *fm)
{
- int ret, i;
+ int ret;
struct ubi_vid_hdr *vh;
ret = erase_block(ubi, fm->e[0]->pnum);
@@ -1360,9 +1360,6 @@ static int invalidate_fastmap(struct ubi_device *ubi,
vh->sqnum = cpu_to_be64(ubi_next_sqnum(ubi));
ret = ubi_io_write_vid_hdr(ubi, fm->e[0]->pnum, vh);
- for (i = 0; i < fm->used_blocks; i++)
- ubi_wl_put_fm_peb(ubi, fm->e[i], i, fm->to_be_tortured[i]);
-
return ret;
}