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>
This commit is contained in:
Rafael J. Wysocki
2007-05-06 14:50:45 -07:00
committed by Linus Torvalds
parent 1525a2ad76
commit 0709db6072
4 changed files with 38 additions and 20 deletions

View File

@@ -140,6 +140,9 @@ struct resume_swap_area {
#define PMOPS_ENTER 2
#define PMOPS_FINISH 3
/* If unset, the snapshot device cannot be open. */
extern atomic_t snapshot_device_available;
/**
* The bitmap is used for tracing allocated swap pages
*