Commit 0fea7ed8 authored by Hirokazu Takahashi's avatar Hirokazu Takahashi Committed by NeilBrown

md: raid1/raid10 md devices leak memory when stopping

Hi.

Raid1 and raid10 devices leak memory every time they stop.
This is a patch for linux-3.9.0-rc7 to fix this problem.

Thanks,
Hirokazu Takahashi.
Signed-off-by: default avatarHirokazu Takahashi <taka@valinux.co.jp>
Signed-off-by: default avatarNeilBrown <neilb@suse.de>
parent be83651f
...@@ -2901,6 +2901,7 @@ static int stop(struct mddev *mddev) ...@@ -2901,6 +2901,7 @@ static int stop(struct mddev *mddev)
if (conf->r1bio_pool) if (conf->r1bio_pool)
mempool_destroy(conf->r1bio_pool); mempool_destroy(conf->r1bio_pool);
kfree(conf->mirrors); kfree(conf->mirrors);
safe_put_page(conf->tmppage);
kfree(conf->poolinfo); kfree(conf->poolinfo);
kfree(conf); kfree(conf);
mddev->private = NULL; mddev->private = NULL;
......
...@@ -3826,6 +3826,7 @@ static int stop(struct mddev *mddev) ...@@ -3826,6 +3826,7 @@ static int stop(struct mddev *mddev)
if (conf->r10bio_pool) if (conf->r10bio_pool)
mempool_destroy(conf->r10bio_pool); mempool_destroy(conf->r10bio_pool);
safe_put_page(conf->tmppage);
kfree(conf->mirrors); kfree(conf->mirrors);
kfree(conf); kfree(conf);
mddev->private = NULL; mddev->private = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment