diff options
Diffstat (limited to 'drivers/md/raid1.c')
-rw-r--r-- | drivers/md/raid1.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index f05d5983efb6..491dc2d4ad5f 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c | |||
@@ -2136,7 +2136,7 @@ static int raid1_reshape(mddev_t *mddev) | |||
2136 | conf_t *conf = mddev_to_conf(mddev); | 2136 | conf_t *conf = mddev_to_conf(mddev); |
2137 | int cnt, raid_disks; | 2137 | int cnt, raid_disks; |
2138 | unsigned long flags; | 2138 | unsigned long flags; |
2139 | int d, d2; | 2139 | int d, d2, err; |
2140 | 2140 | ||
2141 | /* Cannot change chunk_size, layout, or level */ | 2141 | /* Cannot change chunk_size, layout, or level */ |
2142 | if (mddev->chunk_size != mddev->new_chunk || | 2142 | if (mddev->chunk_size != mddev->new_chunk || |
@@ -2148,7 +2148,9 @@ static int raid1_reshape(mddev_t *mddev) | |||
2148 | return -EINVAL; | 2148 | return -EINVAL; |
2149 | } | 2149 | } |
2150 | 2150 | ||
2151 | md_allow_write(mddev); | 2151 | err = md_allow_write(mddev); |
2152 | if (err) | ||
2153 | return err; | ||
2152 | 2154 | ||
2153 | raid_disks = mddev->raid_disks + mddev->delta_disks; | 2155 | raid_disks = mddev->raid_disks + mddev->delta_disks; |
2154 | 2156 | ||