summaryrefslogtreecommitdiff
path: root/kernel/power/snapshot.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2007-05-06 14:50:45 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-07 12:12:59 -0700
commit0709db6072c2e799eba1aa61bd19e0d7f38aa2cd (patch)
treee348c73adbfdcb46b05b23f36dc420ecdd62ca8a /kernel/power/snapshot.c
parent1525a2ad76f991eba9755f75c9b6d4d97abad25e (diff)
swsusp: use GFP_KERNEL for creating basic data structures
Make swsusp call create_basic_memory_bitmaps() before processes are frozen, so that GFP_KERNEL allocations can be made in it. Additionally, ensure that the swsusp's userland interface won't be used while either pm_suspend_disk() or software_resume() is being executed. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/power/snapshot.c')
-rw-r--r--kernel/power/snapshot.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c
index f66e4411795b..128da11f01c2 100644
--- a/kernel/power/snapshot.c
+++ b/kernel/power/snapshot.c
@@ -723,19 +723,19 @@ int create_basic_memory_bitmaps(void)
BUG_ON(forbidden_pages_map || free_pages_map);
- bm1 = kzalloc(sizeof(struct memory_bitmap), GFP_ATOMIC);
+ bm1 = kzalloc(sizeof(struct memory_bitmap), GFP_KERNEL);
if (!bm1)
return -ENOMEM;
- error = memory_bm_create(bm1, GFP_ATOMIC | __GFP_COLD, PG_ANY);
+ error = memory_bm_create(bm1, GFP_KERNEL, PG_ANY);
if (error)
goto Free_first_object;
- bm2 = kzalloc(sizeof(struct memory_bitmap), GFP_ATOMIC);
+ bm2 = kzalloc(sizeof(struct memory_bitmap), GFP_KERNEL);
if (!bm2)
goto Free_first_bitmap;
- error = memory_bm_create(bm2, GFP_ATOMIC | __GFP_COLD, PG_ANY);
+ error = memory_bm_create(bm2, GFP_KERNEL, PG_ANY);
if (error)
goto Free_second_object;