|
@@ -2409,6 +2409,10 @@ static int resize_stripes(struct r5conf *conf, int newsize)
|
|
|
err = -ENOMEM;
|
|
|
|
|
|
mutex_unlock(&conf->cache_size_mutex);
|
|
|
+
|
|
|
+ conf->slab_cache = sc;
|
|
|
+ conf->active_name = 1-conf->active_name;
|
|
|
+
|
|
|
/* Step 4, return new stripes to service */
|
|
|
while(!list_empty(&newstripes)) {
|
|
|
nsh = list_entry(newstripes.next, struct stripe_head, lru);
|
|
@@ -2426,8 +2430,6 @@ static int resize_stripes(struct r5conf *conf, int newsize)
|
|
|
}
|
|
|
/* critical section pass, GFP_NOIO no longer needed */
|
|
|
|
|
|
- conf->slab_cache = sc;
|
|
|
- conf->active_name = 1-conf->active_name;
|
|
|
if (!err)
|
|
|
conf->pool_size = newsize;
|
|
|
return err;
|