Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cbbb29d8 authored by Suren Baghdasaryan's avatar Suren Baghdasaryan
Browse files

ANDROID: fix 4.9 backport of psi header refactoring

The 4.9 backport of the patch https://lore.kernel.org/patchwork/patch/1052417/


introduced a build error when configured with CONFIG_CGROUP_SCHED disabled.
Functions threadgroup_change_begin and threadgroup_change_end were left
undefined. Fix this by moving them out of CONFIG_CGROUP_SCHED protection
the way they were defined initially.
Fixes: c405bfbb ("FROMLIST: refactor header includes to allow kthread.h inclusion in psi_types.h")

Bug: 127712811
Test: make allnoconfig
Change-Id: Ib6e2636fb4e0c47c885df4813082fae13b841cfe
Signed-off-by: default avatarSuren Baghdasaryan <surenb@google.com>
parent 88589c52
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -8582,13 +8582,6 @@ int sched_rr_handler(struct ctl_table *table, int write,
	return ret;
}

#ifdef CONFIG_CGROUP_SCHED

static inline struct task_group *css_tg(struct cgroup_subsys_state *css)
{
	return css ? container_of(css, struct task_group, css) : NULL;
}

void threadgroup_change_begin(struct task_struct *tsk)
{
	might_sleep();
@@ -8600,6 +8593,13 @@ void threadgroup_change_end(struct task_struct *tsk)
	cgroup_threadgroup_change_end(tsk);
}

#ifdef CONFIG_CGROUP_SCHED

static inline struct task_group *css_tg(struct cgroup_subsys_state *css)
{
	return css ? container_of(css, struct task_group, css) : NULL;
}

static struct cgroup_subsys_state *
cpu_cgroup_css_alloc(struct cgroup_subsys_state *parent_css)
{