diff options
author | NeilBrown <neilb@suse.de> | 2014-08-23 06:19:26 -0400 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2014-10-13 22:08:28 -0400 |
commit | c4796e215f487de9bc93731a81e885ac866ef7dc (patch) | |
tree | 5660b51035bd3dd227ed873d7a2202ec7662b9fe | |
parent | 3fd83717e47687817f5d3e45696bf22456d8b422 (diff) |
md/raid10: another memory leak due to reshape.
Signed-off-by: NeilBrown <neilb@suse.de>
-rw-r--r-- | drivers/md/raid10.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index a2788bcf75b2..8fa37eceaef3 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c | |||
@@ -3834,6 +3834,8 @@ static int stop(struct mddev *mddev) | |||
3834 | mempool_destroy(conf->r10bio_pool); | 3834 | mempool_destroy(conf->r10bio_pool); |
3835 | safe_put_page(conf->tmppage); | 3835 | safe_put_page(conf->tmppage); |
3836 | kfree(conf->mirrors); | 3836 | kfree(conf->mirrors); |
3837 | kfree(conf->mirrors_old); | ||
3838 | kfree(conf->mirrors_new); | ||
3837 | kfree(conf); | 3839 | kfree(conf); |
3838 | mddev->private = NULL; | 3840 | mddev->private = NULL; |
3839 | return 0; | 3841 | return 0; |
@@ -4121,7 +4123,7 @@ static int raid10_start_reshape(struct mddev *mddev) | |||
4121 | memcpy(conf->mirrors_new, conf->mirrors, | 4123 | memcpy(conf->mirrors_new, conf->mirrors, |
4122 | sizeof(struct raid10_info)*conf->prev.raid_disks); | 4124 | sizeof(struct raid10_info)*conf->prev.raid_disks); |
4123 | smp_mb(); | 4125 | smp_mb(); |
4124 | kfree(conf->mirrors_old); /* FIXME and elsewhere */ | 4126 | kfree(conf->mirrors_old); |
4125 | conf->mirrors_old = conf->mirrors; | 4127 | conf->mirrors_old = conf->mirrors; |
4126 | conf->mirrors = conf->mirrors_new; | 4128 | conf->mirrors = conf->mirrors_new; |
4127 | conf->mirrors_new = NULL; | 4129 | conf->mirrors_new = NULL; |