aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/md/multipath.c2
-rw-r--r--drivers/md/raid10.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/multipath.c b/drivers/md/multipath.c
index 171ff41b52b0..a6260f0e3b9e 100644
--- a/drivers/md/multipath.c
+++ b/drivers/md/multipath.c
@@ -501,7 +501,7 @@ static int multipath_run (mddev_t *mddev)
501 mdname(mddev)); 501 mdname(mddev));
502 goto out_free_conf; 502 goto out_free_conf;
503 } 503 }
504 mddev->degraded = conf->raid_disks = conf->working_disks; 504 mddev->degraded = conf->raid_disks - conf->working_disks;
505 505
506 conf->pool = mempool_create_kzalloc_pool(NR_RESERVED_BUFS, 506 conf->pool = mempool_create_kzalloc_pool(NR_RESERVED_BUFS,
507 sizeof(struct multipath_bh)); 507 sizeof(struct multipath_bh));
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index 1250f0eab4af..74f17a9a6ebb 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -2079,7 +2079,7 @@ static int run(mddev_t *mddev)
2079 disk = conf->mirrors + i; 2079 disk = conf->mirrors + i;
2080 2080
2081 if (!disk->rdev || 2081 if (!disk->rdev ||
2082 !test_bit(In_sync, &rdev->flags)) { 2082 !test_bit(In_sync, &disk->rdev->flags)) {
2083 disk->head_position = 0; 2083 disk->head_position = 0;
2084 mddev->degraded++; 2084 mddev->degraded++;
2085 } 2085 }