]> git.baikalelectronics.ru Git - kernel.git/commit
PM: Fix warning in pm_restrict_gfp_mask() during SNAPSHOT_S2RAM ioctl
authorRafael J. Wysocki <rjw@sisk.pl>
Tue, 10 May 2011 19:09:53 +0000 (21:09 +0200)
committerRafael J. Wysocki <rjw@sisk.pl>
Wed, 11 May 2011 19:10:14 +0000 (21:10 +0200)
commit8c10117d535667c9edfc336357b2b9bd3377f8d9
tree01b52ab26eb3b4fed09ca7fb11da4fcc1dddb32a
parentc04c1735c8c26372c3f959fc7d2f4a20188bcd7a
PM: Fix warning in pm_restrict_gfp_mask() during SNAPSHOT_S2RAM ioctl

A warning is printed by pm_restrict_gfp_mask() while the
SNAPSHOT_S2RAM ioctl is being executed after creating a hibernation
image, because pm_restrict_gfp_mask() has been called once already
before the image creation and suspend_devices_and_enter() calls it
once again.  This happens after commit b1dc78099cbdd9bbdb8038c6da896a
(mm/pm: force GFP_NOIO during suspend/hibernation and resume).

To avoid this issue, move pm_restrict_gfp_mask() and
pm_restore_gfp_mask() from suspend_devices_and_enter() to its caller
in kernel/power/suspend.c.

Reported-by: Alexandre Felipe Muller de Souza <alexandrefm@mandriva.com.br>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: stable@kernel.org
kernel/power/suspend.c