Li Lingfeng f734e16ee1 dm: don't lock fs when the map is NULL during suspend or resume
[ Upstream commit 2760904d895279f87196f0fa9ec570c79fe6a2e4 ]

As described in commit 38d11da522aa ("dm: don't lock fs when the map is
NULL in process of resume"), a deadlock may be triggered between
do_resume() and do_mount().

This commit preserves the fix from commit 38d11da522aa but moves it to
where it also serves to fix a similar deadlock between do_suspend()
and do_mount().  It does so, if the active map is NULL, by clearing
DM_SUSPEND_LOCKFS_FLAG in dm_suspend() which is called by both
do_suspend() and do_resume().

Fixes: 38d11da522aa ("dm: don't lock fs when the map is NULL in process of resume")
Signed-off-by: Li Lingfeng <lilingfeng3@huawei.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-06-21 15:59:18 +02:00
..
2021-09-02 12:51:41 -07:00
2021-02-26 15:49:51 -07:00
2021-08-16 10:50:32 -06:00
2021-08-10 13:32:40 -04:00
2020-12-16 13:09:32 -08:00
2023-04-05 11:24:52 +02:00
2022-10-26 12:35:12 +02:00
2021-06-14 22:32:07 -07:00
2021-06-14 22:32:07 -07:00