mtd: Add flag to indicate panic_write
Added a flag to indicate a panic_write so that low level drivers can use it to take required action where applicable, to ensure oops data gets written to assigned mtd device. Signed-off-by: Kamal Dasu <kdasu.kdev@gmail.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
This commit is contained in:

committed by
Miquel Raynal

parent
33535b8547
commit
9f897bfdd8
@@ -1124,6 +1124,9 @@ 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;
|
||||
|
||||
return mtd->_panic_write(mtd, to, len, retlen, buf);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mtd_panic_write);
|
||||
|
Reference in New Issue
Block a user