d34248fbc7c408a35701c7baddd8ca01aa9cef3c
[openwrt/staging/thess.git] /
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
4
5 When recursively deleting partitions, don't acquire the masters
6 partition lock twice. Otherwise the process endy up in a deadlocked
7 state.
8
9 Signed-off-by: David Bauer <mail@david-bauer.net>
10 ---
11 drivers/mtd/mtdpart.c | 2 +-
12 1 file changed, 1 insertion(+), 1 deletion(-)
13
14 --- a/drivers/mtd/mtdpart.c
15 +++ b/drivers/mtd/mtdpart.c
16 @@ -331,7 +331,7 @@ static int __del_mtd_partitions(struct m
17
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);
22
23 pr_info("Deleting %s MTD partition\n", child->name);
24 ret = del_mtd_device(child);