提交 1497dd1d 编写于 作者: T Takashi Iwai 提交者: Rafael J. Wysocki

PM / Hibernate: Fix PM_POST_* notification with user-space suspend

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: NTakashi Iwai <tiwai@suse.de>
Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
Cc: stable@kernel.org
上级 b0c3844d
......@@ -137,7 +137,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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册