Skip to content

Commit

Permalink
BUG_ON() Conversion in mm/mempool.c
Browse files Browse the repository at this point in the history
this changes if() BUG(); constructs to BUG_ON() which is
cleaner, contains unlikely() and can better optimized away.

Signed-off-by: Eric Sesterhenn <[email protected]>
Signed-off-by: Adrian Bunk <[email protected]>
  • Loading branch information
SesterhennEric authored and AdrianBunk committed Mar 26, 2006
1 parent 5bcb28b commit f02e1fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mm/mempool.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f02e1fa

Please sign in to comment.