aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/power/user.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/power/user.c')
-rw-r--r--kernel/power/user.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/power/user.c b/kernel/power/user.c
index 05c58a2c0dd4..a63b25c63b49 100644
--- a/kernel/power/user.c
+++ b/kernel/power/user.c
@@ -194,12 +194,12 @@ static int snapshot_ioctl(struct inode *inode, struct file *filp,
194 break; 194 break;
195 195
196 case SNAPSHOT_ATOMIC_RESTORE: 196 case SNAPSHOT_ATOMIC_RESTORE:
197 snapshot_write_finalize(&data->handle);
197 if (data->mode != O_WRONLY || !data->frozen || 198 if (data->mode != O_WRONLY || !data->frozen ||
198 !snapshot_image_loaded(&data->handle)) { 199 !snapshot_image_loaded(&data->handle)) {
199 error = -EPERM; 200 error = -EPERM;
200 break; 201 break;
201 } 202 }
202 snapshot_free_unused_memory(&data->handle);
203 down(&pm_sem); 203 down(&pm_sem);
204 pm_prepare_console(); 204 pm_prepare_console();
205 suspend_console(); 205 suspend_console();