diff options
author | Kamal Dasu <kdasu.kdev@gmail.com> | 2020-06-15 11:51:34 -0400 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2020-06-15 19:39:24 +0200 |
commit | 630e8d5507d9f55dfa98134bfcadefb6cfba4fbb (patch) | |
tree | 37d821ca73672199f4c5a9990ffd11e836498d8c /drivers/mtd | |
parent | 1f6ce4445ab5c97aa63583bd6ce4fc20f471e11c (diff) |
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 <kdasu.kdev@gmail.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20200615155134.32007-1-kdasu.kdev@gmail.com
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/mtdcore.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c index 76d832a88e0c..7d930569a7df 100644 --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c @@ -1273,8 +1273,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); |