diff options
| author | Christoph Lameter <[email protected]> | 2008-02-05 06:28:34 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2008-02-05 17:44:14 +0000 |
| commit | 9e2779fa281cfda13ac060753d674bbcaa23367e (patch) | |
| tree | e2af17d69b71e0f8b3f00fe949cb8abfba4298ed /mm/sparse.c | |
| parent | i386: Resolve dependency of asm-i386/pgtable.h on highmem.h (diff) | |
| download | kernel-9e2779fa281cfda13ac060753d674bbcaa23367e.tar.gz kernel-9e2779fa281cfda13ac060753d674bbcaa23367e.zip | |
is_vmalloc_addr(): Check if an address is within the vmalloc boundaries
Checking if an address is a vmalloc address is done in a couple of places.
Define a common version in mm.h and replace the other checks.
Again the include structures suck. The definition of VMALLOC_START and
VMALLOC_END is not available in vmalloc.h since highmem.c cannot be included
there.
Signed-off-by: Christoph Lameter <[email protected]>
Cc: Nick Piggin <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'mm/sparse.c')
| -rw-r--r-- | mm/sparse.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/mm/sparse.c b/mm/sparse.c index a2183cb5d524..7859c8083334 100644 --- a/mm/sparse.c +++ b/mm/sparse.c @@ -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, |
