mtd: set master partition panic write flag
PATCH v2 1/1 mtd: set master partition panic write flag
Check and set master panic write flag so that low level drivers can use it to take required action to ensure oops data gets written to assigned mtdoops device partition.
Fixes 9f897bfdd89f ("mtd: Add flag to indicate panic_write")
Signed-off-by Kamal Dasu <[email protected]>
--- drivers/mtd/mtdcore.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mtd/mtdcore.c +2 -2
@@ -1235,8 +1235,8 @@ int mtd_panic_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen,return -EROFS ;if (!len)return 0 ; -if (!mtd->oops_panic_write) - mtd->oops_panic_write = true; +if (!master->oops_panic_write) + master->oops_panic_write = true;return master->_panic_write (master,mtd_get_master_ofs (mtd, to), len, retlen, buf);
Signature · 1 line
2.17.1
Quoted 6 lines · Kamal Dasu
Check and set master panic write flag so that low level drivers can use it to take required action to ensure oops data gets written to assigned mtdoops device partition.
Fixes 9f897bfdd89f ("mtd: Add flag to indicate panic_write")Signed-off-by Kamal Dasu <[email protected]>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/fixes, thanks.
Miquel