]> Git Repo - linux.git/blobdiff - mm/page_ext.c
xen/gntdev.c: convert to use vm_map_pages()
[linux.git] / mm / page_ext.c
index 8c78b8d451179710f7652bc5db7160d28b4161b8..d8f1aca4ad43696aa8f368c335a04c69918b77ef 100644 (file)
@@ -161,7 +161,7 @@ static int __init alloc_node_page_ext(int nid)
 
        table_size = get_entry_size() * nr_pages;
 
-       base = memblock_alloc_try_nid_nopanic(
+       base = memblock_alloc_try_nid(
                        table_size, PAGE_SIZE, __pa(MAX_DMA_ADDRESS),
                        MEMBLOCK_ALLOC_ACCESSIBLE, nid);
        if (!base)
@@ -273,6 +273,7 @@ static void free_page_ext(void *addr)
                table_size = get_entry_size() * PAGES_PER_SECTION;
 
                BUG_ON(PageReserved(page));
+               kmemleak_free(addr);
                free_pages_exact(addr, table_size);
        }
 }
@@ -300,7 +301,7 @@ static int __meminit online_page_ext(unsigned long start_pfn,
        start = SECTION_ALIGN_DOWN(start_pfn);
        end = SECTION_ALIGN_UP(start_pfn + nr_pages);
 
-       if (nid == -1) {
+       if (nid == NUMA_NO_NODE) {
                /*
                 * In this case, "nid" already exists and contains valid memory.
                 * "start_pfn" passed to us is a pfn which is an arg for
This page took 0.034923 seconds and 4 git commands to generate.