Commit 84f9d853 authored by Sascha Hauer's avatar Sascha Hauer Committed by Greg Kroah-Hartman
Browse files

ubi: fastmap: Erase outdated anchor PEBs during attach



commit f78e5623 upstream.

The fastmap update code might erase the current fastmap anchor PEB
in case it doesn't find any new free PEB. When a power cut happens
in this situation we must not have any outdated fastmap anchor PEB
on the device, because that would be used to attach during next
boot.
The easiest way to make that sure is to erase all outdated fastmap
anchor PEBs synchronously during attach.

Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: default avatarRichard Weinberger <richard@nod.at>
Fixes: dbb7d2a8 ("UBI: Add fastmap core")
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 44ebd641
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment