|
@@ -3486,8 +3486,7 @@ static struct r10conf *setup_conf(struct mddev *mddev)
|
|
printk(KERN_ERR "md/raid10:%s: couldn't allocate memory.\n",
|
|
printk(KERN_ERR "md/raid10:%s: couldn't allocate memory.\n",
|
|
mdname(mddev));
|
|
mdname(mddev));
|
|
if (conf) {
|
|
if (conf) {
|
|
- if (conf->r10bio_pool)
|
|
|
|
- mempool_destroy(conf->r10bio_pool);
|
|
|
|
|
|
+ mempool_destroy(conf->r10bio_pool);
|
|
kfree(conf->mirrors);
|
|
kfree(conf->mirrors);
|
|
safe_put_page(conf->tmppage);
|
|
safe_put_page(conf->tmppage);
|
|
kfree(conf);
|
|
kfree(conf);
|
|
@@ -3682,8 +3681,7 @@ static int run(struct mddev *mddev)
|
|
|
|
|
|
out_free_conf:
|
|
out_free_conf:
|
|
md_unregister_thread(&mddev->thread);
|
|
md_unregister_thread(&mddev->thread);
|
|
- if (conf->r10bio_pool)
|
|
|
|
- mempool_destroy(conf->r10bio_pool);
|
|
|
|
|
|
+ mempool_destroy(conf->r10bio_pool);
|
|
safe_put_page(conf->tmppage);
|
|
safe_put_page(conf->tmppage);
|
|
kfree(conf->mirrors);
|
|
kfree(conf->mirrors);
|
|
kfree(conf);
|
|
kfree(conf);
|
|
@@ -3696,8 +3694,7 @@ static void raid10_free(struct mddev *mddev, void *priv)
|
|
{
|
|
{
|
|
struct r10conf *conf = priv;
|
|
struct r10conf *conf = priv;
|
|
|
|
|
|
- if (conf->r10bio_pool)
|
|
|
|
- mempool_destroy(conf->r10bio_pool);
|
|
|
|
|
|
+ mempool_destroy(conf->r10bio_pool);
|
|
safe_put_page(conf->tmppage);
|
|
safe_put_page(conf->tmppage);
|
|
kfree(conf->mirrors);
|
|
kfree(conf->mirrors);
|
|
kfree(conf->mirrors_old);
|
|
kfree(conf->mirrors_old);
|