]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - mm/sparse.c
is_vmalloc_addr(): Check if an address is within the vmalloc boundaries
[linux-2.6-omap-h63xx.git] / mm / sparse.c
index a2183cb5d5242a0f05695f00b65d5f0f6d25715e..7859c8083334eb638be78283fbc90310304b29ee 100644 (file)
@@ -353,17 +353,9 @@ static inline struct page *kmalloc_section_memmap(unsigned long pnum, int nid,
        return __kmalloc_section_memmap(nr_pages);
 }
 
-static int vaddr_in_vmalloc_area(void *addr)
-{
-       if (addr >= (void *)VMALLOC_START &&
-           addr < (void *)VMALLOC_END)
-               return 1;
-       return 0;
-}
-
 static void __kfree_section_memmap(struct page *memmap, unsigned long nr_pages)
 {
-       if (vaddr_in_vmalloc_area(memmap))
+       if (is_vmalloc_addr(memmap))
                vfree(memmap);
        else
                free_pages((unsigned long)memmap,