md: centralize ->array_sectors modifications
Get personalities out of the business of directly modifying
->array_sectors. Lays groundwork to introduce policy on when
->array_sectors can be modified.
Reviewed-by: Andre Noll <maan@systemlinux.org>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index 5bf1b24..ad153b2 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -2193,7 +2193,7 @@
/*
* Ok, everything is just fine now
*/
- mddev->array_sectors = raid10_size(mddev, 0, 0);
+ md_set_array_sectors(mddev, raid10_size(mddev, 0, 0));
mddev->resync_max_sectors = mddev->array_sectors;
mddev->queue->unplug_fn = raid10_unplug;