[PATCH] UBI: Fastmap: free unused fastmap anchor peb during detach
richard.weinberger at gmail.com
Sun Jan 12 14:51:38 PST 2020
On Mon, Jan 6, 2020 at 10:02 AM Sascha Hauer <s.hauer at pengutronix.de> wrote:
> On Fri, Dec 20, 2019 at 10:14:49AM +0800, Hou Tao wrote:
> > When CONFIG_MTD_UBI_FASTMAP is enabled, fm_anchor will be assigned
> > a free PEB during ubi_wl_init() or ubi_update_fastmap(). However
> > if fastmap is not used or disabled on the MTD device, ubi_wl_entry
> > related with the PEB will not be freed during detach.
> > So Fix it by freeing the unused fastmap anchor during detach.
> > And also don't generate the initial fm_anchor when fastmap is disabled.
> I think this part deserves an extra patch. Otherwise the changes look
> good to me, so:
Yes, please split this patch.
More information about the linux-mtd