topology.c (213c5a459ae0a7ef0a092f576aae2d5db6819360) topology.c (a090c4f2cd2cfeb54eaf8ad1e726a6c485f3abc3)
1/*
2 * Scheduler topology setup/handling methods
3 */
4#include <linux/sched.h>
5#include <linux/mutex.h>
6
7#include "sched.h"
8

--- 330 unchanged lines hidden (view full) ---

339 kfree(sg);
340 sg = tmp;
341 } while (sg != first);
342}
343
344static void destroy_sched_domain(struct sched_domain *sd)
345{
346 /*
1/*
2 * Scheduler topology setup/handling methods
3 */
4#include <linux/sched.h>
5#include <linux/mutex.h>
6
7#include "sched.h"
8

--- 330 unchanged lines hidden (view full) ---

339 kfree(sg);
340 sg = tmp;
341 } while (sg != first);
342}
343
344static void destroy_sched_domain(struct sched_domain *sd)
345{
346 /*
347 * A sched domain has many groups' reference, and an overlapping
348 * domain has private groups, iterate and nuke them all.
347 * A normal sched domain may have multiple group references, an
348 * overlapping domain, having private groups, only one. Iterate,
349 * dropping group/capacity references, freeing where none remain.
349 */
350 free_sched_groups(sd->groups, 1);
351
352 if (sd->shared && atomic_dec_and_test(&sd->shared->ref))
353 kfree(sd->shared);
354 kfree(sd);
355}
356

--- 1546 unchanged lines hidden ---
350 */
351 free_sched_groups(sd->groups, 1);
352
353 if (sd->shared && atomic_dec_and_test(&sd->shared->ref))
354 kfree(sd->shared);
355 kfree(sd);
356}
357

--- 1546 unchanged lines hidden ---