diff options
Diffstat (limited to 'kernel/sched_cpupri.c')
-rw-r--r-- | kernel/sched_cpupri.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/kernel/sched_cpupri.c b/kernel/sched_cpupri.c index e6871cb3fc83..2722dc1b4138 100644 --- a/kernel/sched_cpupri.c +++ b/kernel/sched_cpupri.c | |||
@@ -166,14 +166,10 @@ void cpupri_set(struct cpupri *cp, int cpu, int newpri) | |||
166 | * | 166 | * |
167 | * Returns: -ENOMEM if memory fails. | 167 | * Returns: -ENOMEM if memory fails. |
168 | */ | 168 | */ |
169 | int cpupri_init(struct cpupri *cp, bool bootmem) | 169 | int cpupri_init(struct cpupri *cp) |
170 | { | 170 | { |
171 | gfp_t gfp = GFP_KERNEL; | ||
172 | int i; | 171 | int i; |
173 | 172 | ||
174 | if (bootmem) | ||
175 | gfp = GFP_NOWAIT; | ||
176 | |||
177 | memset(cp, 0, sizeof(*cp)); | 173 | memset(cp, 0, sizeof(*cp)); |
178 | 174 | ||
179 | for (i = 0; i < CPUPRI_NR_PRIORITIES; i++) { | 175 | for (i = 0; i < CPUPRI_NR_PRIORITIES; i++) { |
@@ -181,7 +177,7 @@ int cpupri_init(struct cpupri *cp, bool bootmem) | |||
181 | 177 | ||
182 | raw_spin_lock_init(&vec->lock); | 178 | raw_spin_lock_init(&vec->lock); |
183 | vec->count = 0; | 179 | vec->count = 0; |
184 | if (!zalloc_cpumask_var(&vec->mask, gfp)) | 180 | if (!zalloc_cpumask_var(&vec->mask, GFP_KERNEL)) |
185 | goto cleanup; | 181 | goto cleanup; |
186 | } | 182 | } |
187 | 183 | ||