aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid10.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/raid10.c')
-rw-r--r--drivers/md/raid10.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index aa8ba0760cac..3480bf7c20d4 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -3554,7 +3554,7 @@ static struct r10conf *setup_conf(struct mddev *mddev)
3554 3554
3555 /* FIXME calc properly */ 3555 /* FIXME calc properly */
3556 conf->mirrors = kzalloc(sizeof(struct raid10_info)*(mddev->raid_disks + 3556 conf->mirrors = kzalloc(sizeof(struct raid10_info)*(mddev->raid_disks +
3557 max(0,mddev->delta_disks)), 3557 max(0,-mddev->delta_disks)),
3558 GFP_KERNEL); 3558 GFP_KERNEL);
3559 if (!conf->mirrors) 3559 if (!conf->mirrors)
3560 goto out; 3560 goto out;
@@ -3713,7 +3713,7 @@ static int run(struct mddev *mddev)
3713 conf->geo.far_offset == 0) 3713 conf->geo.far_offset == 0)
3714 goto out_free_conf; 3714 goto out_free_conf;
3715 if (conf->prev.far_copies != 1 && 3715 if (conf->prev.far_copies != 1 &&
3716 conf->geo.far_offset == 0) 3716 conf->prev.far_offset == 0)
3717 goto out_free_conf; 3717 goto out_free_conf;
3718 } 3718 }
3719 3719