Skip to content

Commit 630e8d5

Browse files
KamalDasumiquelraynal
authored andcommitted
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: 9f897bf ("mtd: Add flag to indicate panic_write") Signed-off-by: Kamal Dasu <[email protected]> Signed-off-by: Miquel Raynal <[email protected]> Link: https://lore.kernel.org/linux-mtd/[email protected]
1 parent 1f6ce44 commit 630e8d5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/mtd/mtdcore.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1273,8 +1273,8 @@ int mtd_panic_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen,
12731273
return -EROFS;
12741274
if (!len)
12751275
return 0;
1276-
if (!mtd->oops_panic_write)
1277-
mtd->oops_panic_write = true;
1276+
if (!master->oops_panic_write)
1277+
master->oops_panic_write = true;
12781278

12791279
return master->_panic_write(master, mtd_get_master_ofs(mtd, to), len,
12801280
retlen, buf);

0 commit comments

Comments
 (0)