|
@@ -1340,10 +1340,8 @@ int blkcg_policy_register(struct blkcg_policy *pol)
|
|
|
struct blkcg_policy_data *cpd;
|
|
struct blkcg_policy_data *cpd;
|
|
|
|
|
|
|
|
cpd = pol->cpd_alloc_fn(GFP_KERNEL);
|
|
cpd = pol->cpd_alloc_fn(GFP_KERNEL);
|
|
|
- if (!cpd) {
|
|
|
|
|
- mutex_unlock(&blkcg_pol_mutex);
|
|
|
|
|
|
|
+ if (!cpd)
|
|
|
goto err_free_cpds;
|
|
goto err_free_cpds;
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
blkcg->cpd[pol->plid] = cpd;
|
|
blkcg->cpd[pol->plid] = cpd;
|
|
|
cpd->blkcg = blkcg;
|
|
cpd->blkcg = blkcg;
|