diff options
author | Tejun Heo <tj@kernel.org> | 2012-01-10 15:08:26 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-10 16:30:45 -0800 |
commit | 0565d317768cc66b13e37184f29d9f270c2886dc (patch) | |
tree | 9618e46da0eac37472cde829d9574a98a1d28bbb /crypto/cryptd.c | |
parent | 5b990546e33477c34ee6fbc20fad6584386b46c3 (diff) | |
download | linux-stable-0565d317768cc66b13e37184f29d9f270c2886dc.tar.gz linux-stable-0565d317768cc66b13e37184f29d9f270c2886dc.tar.bz2 linux-stable-0565d317768cc66b13e37184f29d9f270c2886dc.zip |
mempool: drop unnecessary and incorrect BUG_ON() from mempool_destroy()
mempool_destroy() is a thin wrapper around free_pool(). The only thing it
adds is BUG_ON(pool->curr_nr != pool->min_nr). The intention seems to be
to enforce that all allocated elements are freed; however, the BUG_ON()
can't achieve that (it doesn't know anything about objects above min_nr)
and incorrect as mempool_resize() is allowed to leave the pool extended
but not filled. Furthermore, panicking is way worse than any memory leak
and there are better debug tools to track memory leaks.
Drop the BUG_ON() from mempool_destory() and as that leaves the function
identical to free_pool(), replace it.
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'crypto/cryptd.c')
0 files changed, 0 insertions, 0 deletions