Subject: [PATCH 01/10] dont copy pages that arent RAM

From: Johannes Berg <[email-masked]>
Date: Mon, 05 Feb 2007 19:30:28 +0100

Pages that aren't RAM obviously cannot be saved during suspend-to-disk
so skip them.

Signed-off-by: Johannes Berg <[email-masked]>
Cc: Andrew Morton <[email-masked]>
Cc: Benjamin Herrenschmidt <[email-masked]>

---
Pavel Machek requested this be put into -mm for some more
testing although he says it seems fine.

--- mb-wireless.orig/kernel/power/snapshot.c	2007-02-05 14:24:06.894526864 +0100
+++ mb-wireless/kernel/power/snapshot.c	2007-02-05 14:24:36.544526864 +0100
@@ -686,6 +686,8 @@ static struct page *saveable_page(unsign
 
 	if (PageReserved(page) && pfn_is_nosave(pfn))
 		return NULL;
+	if (!page_is_ram(pfn))
+		return NULL;
 
 	return page;
 }

--