dm: hold suspend_lock while suspending device during device deletion
authorMikulas Patocka <mpatocka@redhat.com>
Fri, 27 Feb 2015 19:04:27 +0000 (14:04 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Apr 2015 12:02:12 +0000 (14:02 +0200)
commit6b031cd888771b2d162a30b519eb111e6aebb476
tree3a49f347cda83d74f1e4384355acc89e56aa47f3
parent5e695f0be9dd973e34148fa271fc941c8179ff08
dm: hold suspend_lock while suspending device during device deletion

commit ab7c7bb6f4ab95dbca96fcfc4463cd69843e3e24 upstream.

__dm_destroy() must take the suspend_lock so that its presuspend and
postsuspend calls do not race with an internal suspend.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm.c