1 From: David Bauer <mail@david-bauer.net>
2 Date: Wed, 17 Feb 2021 03:21:39 +0100
3 Subject: [PATCH] mtd: don't lock when recursively deleting partitions
5 When recursively deleting partitions, don't acquire the masters
6 partition lock twice. Otherwise the process endy up in a deadlocked
9 Signed-off-by: David Bauer <mail@david-bauer.net>
11 drivers/mtd/mtdpart.c | 2 +-
12 1 file changed, 1 insertion(+), 1 deletion(-)
14 --- a/drivers/mtd/mtdpart.c
15 +++ b/drivers/mtd/mtdpart.c
16 @@ -331,7 +331,7 @@ static int __del_mtd_partitions(struct m
18 list_for_each_entry_safe(child, next, &mtd->partitions, part.node) {
19 if (mtd_has_partitions(child))
20 - del_mtd_partitions(child);
21 + __del_mtd_partitions(child);
23 pr_info("Deleting %s MTD partition\n", child->name);
24 ret = del_mtd_device(child);