diff options
author | Christoph Lameter | 2008-02-04 22:28:34 -0800 |
---|---|---|
committer | Linus Torvalds | 2008-02-05 09:44:14 -0800 |
commit | 9e2779fa281cfda13ac060753d674bbcaa23367e (patch) | |
tree | e2af17d69b71e0f8b3f00fe949cb8abfba4298ed /fs/ntfs | |
parent | 0b7a96114bd5991d355a1f1c1d3d9c0c9d9c1cfc (diff) |
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 <clameter@sgi.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ntfs')
-rw-r--r-- | fs/ntfs/malloc.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ntfs/malloc.h b/fs/ntfs/malloc.h index e38e402e4103..cd0be3f5c3cd 100644 --- a/fs/ntfs/malloc.h +++ b/fs/ntfs/malloc.h @@ -85,8 +85,7 @@ static inline void *ntfs_malloc_nofs_nofail(unsigned long size) static inline void ntfs_free(void *addr) { - if (likely(((unsigned long)addr < VMALLOC_START) || - ((unsigned long)addr >= VMALLOC_END ))) { + if (!is_vmalloc_addr(addr)) { kfree(addr); /* free_page((unsigned long)addr); */ return; |