summaryrefslogtreecommitdiff
path: root/drivers/md/bcache
diff options
context:
space:
mode:
authorKent Overstreet <koverstreet@google.com>2013-04-06 00:46:13 +0400
committerKent Overstreet <koverstreet@google.com>2013-04-09 00:33:48 +0400
commit8ef747909cef0dd1ae018beef4bb2e75f26e3f98 (patch)
tree086bda710cd80e639bbbe94475ea4df8bcc2b08d /drivers/md/bcache
parent7b41b51a705ec0eb5f88060c9f724c8bc0e79eab (diff)
downloadlinux-8ef747909cef0dd1ae018beef4bb2e75f26e3f98.tar.xz
bcache: Fix a minor memory leak on device teardown
Reported-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Kent Overstreet <koverstreet@google.com>
Diffstat (limited to 'drivers/md/bcache')
-rw-r--r--drivers/md/bcache/super.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
index f47ecb5cb318..5fa3cd2d9ff0 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)