mtd: don't lock when recursively deleting partitions
authorDavid Bauer <mail@david-bauer.net>
Wed, 17 Feb 2021 19:53:20 +0000 (20:53 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 May 2021 07:50:09 +0000 (09:50 +0200)
commitc55310e30de265b2af6fcbe020bff7b929540fd0
treeb70a0c26ca627a19f8144b950dd2178b4915903e
parent174fe383de80004e27a339f01b2f47ad58d19335
mtd: don't lock when recursively deleting partitions

[ Upstream commit cb4543054c5c4fd33df960b41d7b483ebca8e786 ]

When recursively deleting partitions, don't acquire the masters
partition lock twice. Otherwise the process ends up in a deadlocked
state.

Fixes: 46b5889cc2c5 ("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>
drivers/mtd/mtdpart.c