]> err.no Git - linux-2.6/blobdiff - kernel/power/swsusp.c
[PATCH] coredump: kill ptrace related stuff
[linux-2.6] / kernel / power / swsusp.c
index f9238faf76e4e5308a25c28dfb07970b5ce74d04..17f669c83012e95121d9d8930a32d3bd25c080aa 100644 (file)
@@ -67,9 +67,9 @@ unsigned int count_highmem_pages(void);
 int save_highmem(void);
 int restore_highmem(void);
 #else
-static int save_highmem(void) { return 0; }
-static int restore_highmem(void) { return 0; }
-static unsigned int count_highmem_pages(void) { return 0; }
+static inline int save_highmem(void) { return 0; }
+static inline int restore_highmem(void) { return 0; }
+static inline unsigned int count_highmem_pages(void) { return 0; }
 #endif
 
 /**
@@ -198,8 +198,10 @@ int swsusp_shrink_memory(void)
                        PAGES_FOR_IO;
                tmp = size;
                for_each_zone (zone)
-                       if (!is_highmem(zone))
+                       if (!is_highmem(zone) && populated_zone(zone)) {
                                tmp -= zone->free_pages;
+                               tmp += zone->lowmem_reserve[ZONE_NORMAL];
+                       }
                if (tmp > 0) {
                        tmp = __shrink_memory(tmp);
                        if (!tmp)