is_vmalloc_addr(): Check if an address is within the vmalloc boundaries
[safe/jmp/linux-2.6] / fs / xfs / linux-2.6 / kmem.c
index ed2b16d..e040f1c 100644 (file)
@@ -92,8 +92,7 @@ kmem_zalloc_greedy(size_t *size, size_t minsize, size_t maxsize,
 void
 kmem_free(void *ptr, size_t size)
 {
-       if (((unsigned long)ptr < VMALLOC_START) ||
-           ((unsigned long)ptr >= VMALLOC_END)) {
+       if (!is_vmalloc_addr(ptr)) {
                kfree(ptr);
        } else {
                vfree(ptr);