Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'upstream-3.12-rc1' of git://git.infradead.org/linux-ubi

Pull UBI fixes from Artem Bityutskiy:
"Just a single fastmap fix plus a regression fix"

* tag 'upstream-3.12-rc1' of git://git.infradead.org/linux-ubi:
UBI: Fix invalidate_fastmap()
UBI: Fix PEB leak in wear_leveling_worker()

+4 -4
+1 -4
drivers/mtd/ubi/fastmap.c
··· 1343 1343 static int invalidate_fastmap(struct ubi_device *ubi, 1344 1344 struct ubi_fastmap_layout *fm) 1345 1345 { 1346 - int ret, i; 1346 + int ret; 1347 1347 struct ubi_vid_hdr *vh; 1348 1348 1349 1349 ret = erase_block(ubi, fm->e[0]->pnum); ··· 1359 1359 * back to scanning mode in any case */ 1360 1360 vh->sqnum = cpu_to_be64(ubi_next_sqnum(ubi)); 1361 1361 ret = ubi_io_write_vid_hdr(ubi, fm->e[0]->pnum, vh); 1362 - 1363 - for (i = 0; i < fm->used_blocks; i++) 1364 - ubi_wl_put_fm_peb(ubi, fm->e[i], i, fm->to_be_tortured[i]); 1365 1362 1366 1363 return ret; 1367 1364 }
+3
drivers/mtd/ubi/wl.c
··· 1069 1069 if (!(e2->ec - e1->ec >= UBI_WL_THRESHOLD)) { 1070 1070 dbg_wl("no WL needed: min used EC %d, max free EC %d", 1071 1071 e1->ec, e2->ec); 1072 + 1073 + /* Give the unused PEB back */ 1074 + wl_tree_add(e2, &ubi->free); 1072 1075 goto out_cancel; 1073 1076 } 1074 1077 self_check_in_wl_tree(ubi, e1, &ubi->used);