diff options
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r-- | drivers/md/raid5.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index be008f034ada..8a30b297ac3a 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -405,6 +405,8 @@ static int resize_stripes(raid5_conf_t *conf, int newsize) | |||
405 | if (newsize <= conf->pool_size) | 405 | if (newsize <= conf->pool_size) |
406 | return 0; /* never bother to shrink */ | 406 | return 0; /* never bother to shrink */ |
407 | 407 | ||
408 | md_allow_write(conf->mddev); | ||
409 | |||
408 | /* Step 1 */ | 410 | /* Step 1 */ |
409 | sc = kmem_cache_create(conf->cache_name[1-conf->active_name], | 411 | sc = kmem_cache_create(conf->cache_name[1-conf->active_name], |
410 | sizeof(struct stripe_head)+(newsize-1)*sizeof(struct r5dev), | 412 | sizeof(struct stripe_head)+(newsize-1)*sizeof(struct r5dev), |
@@ -3250,6 +3252,7 @@ raid5_store_stripe_cache_size(mddev_t *mddev, const char *page, size_t len) | |||
3250 | else | 3252 | else |
3251 | break; | 3253 | break; |
3252 | } | 3254 | } |
3255 | md_allow_write(mddev); | ||
3253 | while (new > conf->max_nr_stripes) { | 3256 | while (new > conf->max_nr_stripes) { |
3254 | if (grow_one_stripe(conf)) | 3257 | if (grow_one_stripe(conf)) |
3255 | conf->max_nr_stripes++; | 3258 | conf->max_nr_stripes++; |