diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index 617012bc107a..ddc1dfc4d3d2 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c @@ -1435,9 +1435,9 @@ static void raid10d(mddev_t *mddev) sl--; d = r10_bio->devs[sl].devnum; rdev = conf->mirrors[d].rdev; - atomic_add(s, &rdev->corrected_errors); if (rdev && test_bit(In_sync, &rdev->flags)) { + atomic_add(s, &rdev->corrected_errors); if (sync_page_io(rdev->bdev, r10_bio->devs[sl].addr + sect + rdev->data_offset,