mtd: ubi: introduce pre-removal notification for UBI volumes
authorDaniel Golle <daniel@makrotopia.org>
Tue, 19 Dec 2023 02:33:24 +0000 (02:33 +0000)
committerRichard Weinberger <richard@nod.at>
Sun, 25 Feb 2024 21:41:33 +0000 (22:41 +0100)
commit7e84c961b2eb062d2f47037dcca52dcd1d3615b5
tree21a7388dc6708d72f756ceaa4876ad481c47c5ac
parent927c145208b04490fb40c5c88a1086b592bfac25
mtd: ubi: introduce pre-removal notification for UBI volumes

Introduce a new notification type UBI_VOLUME_SHUTDOWN to inform users
that a volume is just about to be removed.
This is needed because users (such as the NVMEM subsystem) expect that
at the time their removal function is called, the parenting device is
still available (for removal of sysfs nodes, for example, in case of
NVMEM which otherwise WARNs on volume removal).

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Richard Weinberger <richard@nod.at>
drivers/mtd/ubi/build.c
drivers/mtd/ubi/kapi.c
drivers/mtd/ubi/ubi.h
drivers/mtd/ubi/vmt.c
include/linux/mtd/ubi.h