readahead.c: fix comment
[safe/jmp/linux-2.6] / mm / swap.c
index 4a8a59e..7cd60bf 100644 (file)
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -30,6 +30,7 @@
 #include <linux/notifier.h>
 #include <linux/backing-dev.h>
 #include <linux/memcontrol.h>
+#include <linux/gfp.h>
 
 #include "internal.h"
 
@@ -55,7 +56,7 @@ static void __page_cache_release(struct page *page)
                del_page_from_lru(zone, page);
                spin_unlock_irqrestore(&zone->lru_lock, flags);
        }
-       free_hot_page(page);
+       free_hot_cold_page(page, 0);
 }
 
 static void put_compound_page(struct page *page)
@@ -496,7 +497,7 @@ EXPORT_SYMBOL(pagevec_lookup_tag);
  */
 void __init swap_setup(void)
 {
-       unsigned long megs = num_physpages >> (20 - PAGE_SHIFT);
+       unsigned long megs = totalram_pages >> (20 - PAGE_SHIFT);
 
 #ifdef CONFIG_SWAP
        bdi_init(swapper_space.backing_dev_info);