diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-04-01 03:23:29 +0400 |
---|---|---|
committer | Adrian Bunk <bunk@stusta.de> | 2006-04-01 03:23:29 +0400 |
commit | 46a350ef9803a2526a128c55cdb27dd73b2ad966 (patch) | |
tree | abd046a56c524965862f056e8edff0be629847cb /mm | |
parent | 8abd8e298eb15e2c1b993df0634daf29e43e0aab (diff) | |
download | linux-46a350ef9803a2526a128c55cdb27dd73b2ad966.tar.xz |
BUG_ON() Conversion in mm/mmap.c
this changes if() BUG(); constructs to BUG_ON() which is
cleaner, contains unlikely() and can better optimized away.
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/mmap.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/mm/mmap.c b/mm/mmap.c index 4f5b5709136a..e780d19aa214 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -294,8 +294,7 @@ void validate_mm(struct mm_struct *mm) i = browse_rb(&mm->mm_rb); if (i != mm->map_count) printk("map_count %d rb %d\n", mm->map_count, i), bug = 1; - if (bug) - BUG(); + BUG_ON(bug); } #else #define validate_mm(mm) do { } while (0) @@ -432,8 +431,7 @@ __insert_vm_struct(struct mm_struct * mm, struct vm_area_struct * vma) struct rb_node ** rb_link, * rb_parent; __vma = find_vma_prepare(mm, vma->vm_start,&prev, &rb_link, &rb_parent); - if (__vma && __vma->vm_start < vma->vm_end) - BUG(); + BUG_ON(__vma && __vma->vm_start < vma->vm_end); __vma_link(mm, vma, prev, rb_link, rb_parent); mm->map_count++; } @@ -813,8 +811,7 @@ try_prev: * (e.g. stash info in next's anon_vma_node when assigning * an anon_vma, or when trying vma_merge). Another time. */ - if (find_vma_prev(vma->vm_mm, vma->vm_start, &near) != vma) - BUG(); + BUG_ON(find_vma_prev(vma->vm_mm, vma->vm_start, &near) != vma); if (!near) goto none; |