On Mon, Apr 01, 2013 at 03:09:58PM -0400, Mike Snitzer wrote:
> FYI, here are some leaks that kmemleak caught when I tested Jens'
> for-next with test_git_extract_bcache_quick from the thinp-test-suite:

Thanks - looks like it was all the same allocation. Just pushed the fix:


commit 671963671170880beed71378f51124433ffeebb8
Author: Kent Overstreet <[email protected]>
Date:   Fri Apr 5 13:46:13 2013 -0700

    bcache: Fix a minor memory leak on device teardown
    
    Reported-by: Mike Snitzer <[email protected]>
    Signed-off-by: Kent Overstreet <[email protected]>

diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
index f47ecb5..5fa3cd2 100644
--- a/drivers/md/bcache/super.c
+++ b/drivers/md/bcache/super.c
@@ -64,9 +64,11 @@ struct workqueue_struct *bcache_wq;
 
 static void bio_split_pool_free(struct bio_split_pool *p)
 {
+       if (p->bio_split_hook)
+               mempool_destroy(p->bio_split_hook);
+
        if (p->bio_split)
                bioset_free(p->bio_split);
-
 }
 
 static int bio_split_pool_init(struct bio_split_pool *p)
--
To unsubscribe from this list: send the line "unsubscribe linux-bcache" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to