mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-04 19:34:17 +08:00
Just a single fastmap fix plus a regression fix.
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) iQIcBAABAgAGBQJSNrFCAAoJECmIfjd9wqK0yvIP/RZoKYaNMMFoJts8oEr55D/8 AoYuoWTnYZSNxdJ50vHBaZdI0gtpu+sKo7iLgVCF++rAK7T+asLevqpJFx7ht7ji /bGpkncwKACCt7yWhKiqJ7Z9XJnEf5u99fW9up/1gU2Ds/7emjKjaz0pXhSkk6Ut PwKof/PckzT8kAnePPnCLhyHsKHFm65TrnmAv5RBOTIM2jUHPLtXXHM3V6Bvnafv QzI0u2BClbw6U5N3bg1lFzD9Ww6RwPzBc8wOw9wVRR/bpYxAK/3itiWp5DLhVQHF aH7cfXe1y7ccn3IK0aaa0S2ZM50m5t6id2/CMBgTXjDTZmU4sFGQI6TtjRAv47xr DOqMpH/RGaGmIkA+TLOJCS+qN/Zqdt2sdINiIRZDLfN/14swdaN5oxUJbccsxSa5 hnuXGkH/1VxGsWNUJz55s3ugS81SEcSqo26fMbOPDHI/N+SniBHe7G3/0vggUoG0 rGNCjFXchslYTwtZM4bjrkS5vBfQHlL9Y1XAztjejqMa/TVg+REo2vTB7cJYZL2w NE/fj8CwxN1ziMvMcK1eQt9HpVkH1GUvzNc+vc+ZmQJRPZSrW4t5DecuCnEVunq8 t+Gae4vhVliWHFQwHwiTucYgmfLg6GOmcXSs4fjYN2j7pHMZTRYJPNA3ygDhdRX2 f3xWERPP5H8GJAhSJyBj =qMi3 -----END PGP SIGNATURE----- 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()
This commit is contained in:
commit
f1da3458e9
@ -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;
|
||||
}
|
||||
|
||||
|
@ -1069,6 +1069,9 @@ static int wear_leveling_worker(struct ubi_device *ubi, struct ubi_work *wrk,
|
||||
if (!(e2->ec - e1->ec >= UBI_WL_THRESHOLD)) {
|
||||
dbg_wl("no WL needed: min used EC %d, max free EC %d",
|
||||
e1->ec, e2->ec);
|
||||
|
||||
/* Give the unused PEB back */
|
||||
wl_tree_add(e2, &ubi->free);
|
||||
goto out_cancel;
|
||||
}
|
||||
self_check_in_wl_tree(ubi, e1, &ubi->used);
|
||||
|
Loading…
Reference in New Issue
Block a user