summaryrefslogtreecommitdiff
path: root/kernel/power/tuxonice_highlevel.c
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-04-23 04:02:05 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-04-23 04:02:05 -0300
commit394569928e2f17dff4ae367ac700048138e318c7 (patch)
treec789d2a2d107284e78f6c6558267b6984f518581 /kernel/power/tuxonice_highlevel.c
parentbdcfd44fb5b5fb8fd660e7f93f1095c507481024 (diff)
Linux-libre 4.5.2-gnupck-4.5.2-gnu
Diffstat (limited to 'kernel/power/tuxonice_highlevel.c')
-rw-r--r--kernel/power/tuxonice_highlevel.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/power/tuxonice_highlevel.c b/kernel/power/tuxonice_highlevel.c
index 16cf14cbc..1ef1f22b7 100644
--- a/kernel/power/tuxonice_highlevel.c
+++ b/kernel/power/tuxonice_highlevel.c
@@ -160,7 +160,8 @@ void toi_finish_anything(int hibernate_or_resume)
set_cpus_allowed_ptr(current, cpu_all_mask);
toi_alloc_print_debug_stats();
atomic_inc(&snapshot_device_available);
- unlock_system_sleep();
+ unlock_system_sleep();
+ release_super_lock();
}
set_fs(oldfs);
@@ -185,7 +186,8 @@ int toi_start_anything(int hibernate_or_resume)
toi_trace_index = 0;
if (hibernate_or_resume) {
- lock_system_sleep();
+ take_super_lock();
+ lock_system_sleep();
if (!atomic_add_unless(&snapshot_device_available, -1, 0))
goto snapshotdevice_unavailable;
@@ -230,6 +232,7 @@ prehibernate_err:
snapshotdevice_unavailable:
if (hibernate_or_resume)
mutex_unlock(&pm_mutex);
+ release_super_lock();
set_fs(oldfs);
mutex_unlock(&tuxonice_in_use);
return -EBUSY;