|
@@ -6248,23 +6248,18 @@ static void rq_attach_root(struct rq *rq, struct root_domain *rd)
|
|
free_rootdomain(old_rd);
|
|
free_rootdomain(old_rd);
|
|
}
|
|
}
|
|
|
|
|
|
-static int init_rootdomain(struct root_domain *rd, bool bootmem)
|
|
|
|
|
|
+static int init_rootdomain(struct root_domain *rd)
|
|
{
|
|
{
|
|
- gfp_t gfp = GFP_KERNEL;
|
|
|
|
-
|
|
|
|
memset(rd, 0, sizeof(*rd));
|
|
memset(rd, 0, sizeof(*rd));
|
|
|
|
|
|
- if (bootmem)
|
|
|
|
- gfp = GFP_NOWAIT;
|
|
|
|
-
|
|
|
|
- if (!alloc_cpumask_var(&rd->span, gfp))
|
|
|
|
|
|
+ if (!alloc_cpumask_var(&rd->span, GFP_KERNEL))
|
|
goto out;
|
|
goto out;
|
|
- if (!alloc_cpumask_var(&rd->online, gfp))
|
|
|
|
|
|
+ if (!alloc_cpumask_var(&rd->online, GFP_KERNEL))
|
|
goto free_span;
|
|
goto free_span;
|
|
- if (!alloc_cpumask_var(&rd->rto_mask, gfp))
|
|
|
|
|
|
+ if (!alloc_cpumask_var(&rd->rto_mask, GFP_KERNEL))
|
|
goto free_online;
|
|
goto free_online;
|
|
|
|
|
|
- if (cpupri_init(&rd->cpupri, bootmem) != 0)
|
|
|
|
|
|
+ if (cpupri_init(&rd->cpupri) != 0)
|
|
goto free_rto_mask;
|
|
goto free_rto_mask;
|
|
return 0;
|
|
return 0;
|
|
|
|
|
|
@@ -6280,7 +6275,7 @@ out:
|
|
|
|
|
|
static void init_defrootdomain(void)
|
|
static void init_defrootdomain(void)
|
|
{
|
|
{
|
|
- init_rootdomain(&def_root_domain, true);
|
|
|
|
|
|
+ init_rootdomain(&def_root_domain);
|
|
|
|
|
|
atomic_set(&def_root_domain.refcount, 1);
|
|
atomic_set(&def_root_domain.refcount, 1);
|
|
}
|
|
}
|
|
@@ -6293,7 +6288,7 @@ static struct root_domain *alloc_rootdomain(void)
|
|
if (!rd)
|
|
if (!rd)
|
|
return NULL;
|
|
return NULL;
|
|
|
|
|
|
- if (init_rootdomain(rd, false) != 0) {
|
|
|
|
|
|
+ if (init_rootdomain(rd) != 0) {
|
|
kfree(rd);
|
|
kfree(rd);
|
|
return NULL;
|
|
return NULL;
|
|
}
|
|
}
|