diff options
author | Arjan van de Ven <arjan@linux.intel.com> | 2008-07-25 22:45:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-26 15:00:07 -0400 |
commit | 4c8573e25f27b60b495aaa23089032f685ffd5ba (patch) | |
tree | 2e145313b10076801e8c60828f22d73d14ec2fd7 | |
parent | b8c512f6190e313df69060bae4a161c5c044e272 (diff) |
Use WARN() in mm/vmalloc.c
Use WARN() instead of a printk+WARN_ON() pair; this way the message becomes
part of the warning section for better reporting/collection.
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | mm/vmalloc.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 35f293816294..85b9a0d2c877 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c | |||
@@ -381,16 +381,14 @@ static void __vunmap(const void *addr, int deallocate_pages) | |||
381 | return; | 381 | return; |
382 | 382 | ||
383 | if ((PAGE_SIZE-1) & (unsigned long)addr) { | 383 | if ((PAGE_SIZE-1) & (unsigned long)addr) { |
384 | printk(KERN_ERR "Trying to vfree() bad address (%p)\n", addr); | 384 | WARN(1, KERN_ERR "Trying to vfree() bad address (%p)\n", addr); |
385 | WARN_ON(1); | ||
386 | return; | 385 | return; |
387 | } | 386 | } |
388 | 387 | ||
389 | area = remove_vm_area(addr); | 388 | area = remove_vm_area(addr); |
390 | if (unlikely(!area)) { | 389 | if (unlikely(!area)) { |
391 | printk(KERN_ERR "Trying to vfree() nonexistent vm area (%p)\n", | 390 | WARN(1, KERN_ERR "Trying to vfree() nonexistent vm area (%p)\n", |
392 | addr); | 391 | addr); |
393 | WARN_ON(1); | ||
394 | return; | 392 | return; |
395 | } | 393 | } |
396 | 394 | ||