aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid1.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/raid1.c')
-rw-r--r--drivers/md/raid1.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 98b09773e79e..ff1dbec864af 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -1427,10 +1427,8 @@ out_free_conf:
1427 if (conf) { 1427 if (conf) {
1428 if (conf->r1bio_pool) 1428 if (conf->r1bio_pool)
1429 mempool_destroy(conf->r1bio_pool); 1429 mempool_destroy(conf->r1bio_pool);
1430 if (conf->mirrors) 1430 kfree(conf->mirrors);
1431 kfree(conf->mirrors); 1431 kfree(conf->poolinfo);
1432 if (conf->poolinfo)
1433 kfree(conf->poolinfo);
1434 kfree(conf); 1432 kfree(conf);
1435 mddev->private = NULL; 1433 mddev->private = NULL;
1436 } 1434 }
@@ -1447,10 +1445,8 @@ static int stop(mddev_t *mddev)
1447 blk_sync_queue(mddev->queue); /* the unplug fn references 'conf'*/ 1445 blk_sync_queue(mddev->queue); /* the unplug fn references 'conf'*/
1448 if (conf->r1bio_pool) 1446 if (conf->r1bio_pool)
1449 mempool_destroy(conf->r1bio_pool); 1447 mempool_destroy(conf->r1bio_pool);
1450 if (conf->mirrors) 1448 kfree(conf->mirrors);
1451 kfree(conf->mirrors); 1449 kfree(conf->poolinfo);
1452 if (conf->poolinfo)
1453 kfree(conf->poolinfo);
1454 kfree(conf); 1450 kfree(conf);
1455 mddev->private = NULL; 1451 mddev->private = NULL;
1456 return 0; 1452 return 0;