[Trusty][PATCH 1/2] Revert "dm: fix AB-BA deadlock in __dm_destroy()"
Luis Henriques
luis.henriques at canonical.com
Fri Dec 4 11:58:28 UTC 2015
BugLink: https://bugs.launchpad.net/bugs/1522766
This reverts commit 340f3e9970d6251a549d0c8cf90179b190f15def, which was
commit 2a708cff93f1845b9239bc7d6310aef54e716c6a upstream.
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
drivers/md/dm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 23c95ba85019..ad6cf066c992 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -2490,14 +2490,14 @@ static void __dm_destroy(struct mapped_device *md, bool wait)
* do not race with internal suspend.
*/
mutex_lock(&md->suspend_lock);
- map = dm_get_live_table(md, &srcu_idx);
if (!dm_suspended_md(md)) {
dm_table_presuspend_targets(map);
dm_table_postsuspend_targets(map);
}
+ mutex_unlock(&md->suspend_lock);
+
/* dm_put_live_table must be before msleep, otherwise deadlock is possible */
dm_put_live_table(md, srcu_idx);
- mutex_unlock(&md->suspend_lock);
/*
* Rare, but there may be I/O requests still going to complete,
More information about the kernel-team
mailing list