diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/memory.c | 6 | ||||
-rw-r--r-- | mm/mempool.c | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/mm/memory.c b/mm/memory.c index 67686048f09..8d8f52569f3 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -2354,10 +2354,8 @@ int make_pages_present(unsigned long addr, unsigned long end) if (!vma) return -1; write = (vma->vm_flags & VM_WRITE) != 0; - if (addr >= end) - BUG(); - if (end > vma->vm_end) - BUG(); + BUG_ON(addr >= end); + BUG_ON(end > vma->vm_end); len = (end+PAGE_SIZE-1)/PAGE_SIZE-addr/PAGE_SIZE; ret = get_user_pages(current, current->mm, addr, len, write, 0, NULL, NULL); diff --git a/mm/mempool.c b/mm/mempool.c index 7bf064e6a34..fe6e05289cc 100644 --- a/mm/mempool.c +++ b/mm/mempool.c @@ -183,8 +183,8 @@ EXPORT_SYMBOL(mempool_resize); */ void mempool_destroy(mempool_t *pool) { - if (pool->curr_nr != pool->min_nr) - BUG(); /* There were outstanding elements */ + /* Check for outstanding elements */ + BUG_ON(pool->curr_nr != pool->min_nr); free_pool(pool); } EXPORT_SYMBOL(mempool_destroy); |