diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-12-10 00:16:39 +0100 |
---|---|---|
committer | Willy Tarreau <w@1wt.eu> | 2011-02-09 22:15:37 +0100 |
commit | 7980031ece121eb01f34cfd21b08687e7c9f3da1 (patch) | |
tree | 4fb17b6210d125fe9e46983064c2fe9d1485c750 /kernel | |
parent | 27e4f346bd7900dec3a2bcea269303b9fcd947fe (diff) |
PM / Hibernate: Fix PM_POST_* notification with user-space suspend
commit 1497dd1d29c6a53fcd3c80f7ac8d0e0239e7389e upstream.
The user-space hibernation sends a wrong notification after the image
restoration because of thinko for the file flag check. RDONLY
corresponds to hibernation and WRONLY to restoration, confusingly.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/power/user.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/power/user.c b/kernel/power/user.c index a6332a313262..245339998a95 100644 --- a/kernel/power/user.c +++ b/kernel/power/user.c @@ -129,7 +129,7 @@ static int snapshot_release(struct inode *inode, struct file *filp) free_all_swap_pages(data->swap); if (data->frozen) thaw_processes(); - pm_notifier_call_chain(data->mode == O_WRONLY ? + pm_notifier_call_chain(data->mode == O_RDONLY ? PM_POST_HIBERNATION : PM_POST_RESTORE); atomic_inc(&snapshot_device_available); |