mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-25 20:10:23 +09:00
mtd: don't lock when recursively deleting partitions
[ Upstream commitcb4543054c] When recursively deleting partitions, don't acquire the masters partition lock twice. Otherwise the process ends up in a deadlocked state. Fixes:46b5889cc2("mtd: implement proper partition handling") Signed-off-by: David Bauer <mail@david-bauer.net> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20210217195320.893253-1-mail@david-bauer.net Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
174fe383de
commit
c55310e30d
@@ -331,7 +331,7 @@ static int __del_mtd_partitions(struct mtd_info *mtd)
|
||||
|
||||
list_for_each_entry_safe(child, next, &mtd->partitions, part.node) {
|
||||
if (mtd_has_partitions(child))
|
||||
del_mtd_partitions(child);
|
||||
__del_mtd_partitions(child);
|
||||
|
||||
pr_info("Deleting %s MTD partition\n", child->name);
|
||||
ret = del_mtd_device(child);
|
||||
|
||||
Reference in New Issue
Block a user