Skip to content

Commit

Permalink
Merge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/…
Browse files Browse the repository at this point in the history
…git/rafael/suspend-2.6

* 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
  PM / Hibernate: Fix ioctl SNAPSHOT_S2RAM
  PM / Hibernate: Make snapshot_release() restore GFP mask
  PM: Fix warning in pm_restrict_gfp_mask() during SNAPSHOT_S2RAM ioctl
  • Loading branch information
Linus Torvalds committed May 12, 2011
2 parents 1d929b7 + 36cb703 commit 0e6f76c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions kernel/power/suspend.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ int suspend_devices_and_enter(suspend_state_t state)
goto Close;
}
suspend_console();
pm_restrict_gfp_mask();
suspend_test_start();
error = dpm_suspend_start(PMSG_SUSPEND);
if (error) {
Expand All @@ -233,7 +232,6 @@ int suspend_devices_and_enter(suspend_state_t state)
suspend_test_start();
dpm_resume_end(PMSG_RESUME);
suspend_test_finish("resume devices");
pm_restore_gfp_mask();
resume_console();
Close:
if (suspend_ops->end)
Expand Down Expand Up @@ -294,7 +292,9 @@ int enter_state(suspend_state_t state)
goto Finish;

pr_debug("PM: Entering %s sleep\n", pm_states[state]);
pm_restrict_gfp_mask();
error = suspend_devices_and_enter(state);
pm_restore_gfp_mask();

Finish:
pr_debug("PM: Finishing wakeup.\n");
Expand Down
5 changes: 4 additions & 1 deletion kernel/power/user.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,10 @@ static int snapshot_release(struct inode *inode, struct file *filp)
free_basic_memory_bitmaps();
data = filp->private_data;
free_all_swap_pages(data->swap);
if (data->frozen)
if (data->frozen) {
pm_restore_gfp_mask();
thaw_processes();
}
pm_notifier_call_chain(data->mode == O_RDONLY ?
PM_POST_HIBERNATION : PM_POST_RESTORE);
atomic_inc(&snapshot_device_available);
Expand Down Expand Up @@ -379,6 +381,7 @@ static long snapshot_ioctl(struct file *filp, unsigned int cmd,
* PM_HIBERNATION_PREPARE
*/
error = suspend_devices_and_enter(PM_SUSPEND_MEM);
data->ready = 0;
break;

case SNAPSHOT_PLATFORM_SUPPORT:
Expand Down

0 comments on commit 0e6f76c

Please sign in to comment.