mm: replace various uses of num_physpages by totalram_pages
[safe/jmp/linux-2.6] / mm / vmalloc.c
index 9216b25..5535da1 100644 (file)
@@ -1386,7 +1386,7 @@ void *vmap(struct page **pages, unsigned int count,
 
        might_sleep();
 
-       if (count > num_physpages)
+       if (count > totalram_pages)
                return NULL;
 
        area = get_vm_area_caller((count << PAGE_SHIFT), flags,
@@ -1493,7 +1493,7 @@ static void *__vmalloc_node(unsigned long size, gfp_t gfp_mask, pgprot_t prot,
        unsigned long real_size = size;
 
        size = PAGE_ALIGN(size);
-       if (!size || (size >> PAGE_SHIFT) > num_physpages)
+       if (!size || (size >> PAGE_SHIFT) > totalram_pages)
                return NULL;
 
        area = __get_vm_area_node(size, VM_ALLOC, VMALLOC_START, VMALLOC_END,