aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2011-05-10 21:10:01 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2011-05-21 15:13:12 -0700
commit29639f09f1f93fec0b6a53aff7cf8927bbd3b783 (patch)
tree9d24f384408ae9d8ea4d88ebbefda44a48274e74
parentb869799eec5145afe463368afb679445d8e4bc3f (diff)
downloadlinux-2.6.38-lt-ux500-29639f09f1f93fec0b6a53aff7cf8927bbd3b783.tar.gz
PM / Hibernate: Make snapshot_release() restore GFP mask
commit 9744997a8a2280e67984d4bffd87221d24f3b6b1 upstream. If the process using the hibernate user space interface closes /dev/snapshot after creating a hibernation image without thawing tasks, snapshot_release() should call pm_restore_gfp_mask() to restore the GFP mask used before the creation of the image. Make that happen. Tested-by: Alexandre Felipe Muller de Souza <alexandrefm@mandriva.com.br> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--kernel/power/user.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/power/user.c b/kernel/power/user.c
index c36c3b9e8a8..6522be913ac 100644
--- a/kernel/power/user.c
+++ b/kernel/power/user.c
@@ -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);