PM / hibernate / memory hotplug: Rework mutual exclusion
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 30 Aug 2013 12:19:46 +0000 (14:19 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 31 Aug 2013 00:49:47 +0000 (02:49 +0200)
commit942f40155a743f4204308d62405dacaa4bfadb11
treec65e934016413151824dcb6b15e0f2ae6ce1d23d
parent8fd37a4c9822d58c93f764864582aa13112b1513
PM / hibernate / memory hotplug: Rework mutual exclusion

Since all of the memory hotplug operations have to be carried out
under device_hotplug_lock, they won't need to acquire pm_mutex if
device_hotplug_lock is held around hibernation.

For this reason, make the hibernation code acquire
device_hotplug_lock after freezing user space processes and
release it before thawing them.  At the same tim drop the
lock_system_sleep() and unlock_system_sleep() calls from
lock_memory_hotplug() and unlock_memory_hotplug(), respectively.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Toshi Kani <toshi.kani@hp.com>
kernel/power/hibernate.c
kernel/power/user.c
mm/memory_hotplug.c