mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
mtd: onenand: fix deadlock in onenand_block_markbad
Commit5942ddbc50("mtd: introduce mtd_block_markbad interface") incorrectly changed onenand_block_markbad() to call mtd_block_markbad instead of onenand_chip's block_markbad function. As a result the function will now recurse and deadlock. Fix by reverting the change. Fixes:5942ddbc50("mtd: introduce mtd_block_markbad interface") Signed-off-by: Aaro Koskinen <[email protected]> Acked-by: Artem Bityutskiy <[email protected]> Cc: <[email protected]> Signed-off-by: Brian Norris <[email protected]>
This commit is contained in:
parent
3b5394a3cc
commit
5e64c29e98
1 changed files with 2 additions and 1 deletions
|
|
@ -2599,6 +2599,7 @@ static int onenand_default_block_markbad(struct mtd_info *mtd, loff_t ofs)
|
|||
*/
|
||||
static int onenand_block_markbad(struct mtd_info *mtd, loff_t ofs)
|
||||
{
|
||||
struct onenand_chip *this = mtd->priv;
|
||||
int ret;
|
||||
|
||||
ret = onenand_block_isbad(mtd, ofs);
|
||||
|
|
@ -2610,7 +2611,7 @@ static int onenand_block_markbad(struct mtd_info *mtd, loff_t ofs)
|
|||
}
|
||||
|
||||
onenand_get_device(mtd, FL_WRITING);
|
||||
ret = mtd_block_markbad(mtd, ofs);
|
||||
ret = this->block_markbad(mtd, ofs);
|
||||
onenand_release_device(mtd);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue