summaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2012-01-10 15:08:26 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2012-01-10 16:30:45 -0800
commit0565d317768cc66b13e37184f29d9f270c2886dc (patch)
tree9618e46da0eac37472cde829d9574a98a1d28bbb /ipc
parent5b990546e33477c34ee6fbc20fad6584386b46c3 (diff)
downloadlinux-0565d317768cc66b13e37184f29d9f270c2886dc.tar.bz2
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 'ipc')
0 files changed, 0 insertions, 0 deletions