Merge branch 'audit.b10' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit...
[firefly-linux-kernel-4.4.55.git] / mm / mempool.c
index 7bf064e6a345e898a5eafc616cd691b50fbedcec..fe6e05289cc5b5b7b30f036980fb7ea3835892e0 100644 (file)
@@ -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);