[RESEND][PATCH]: sched: Fix compile errors introduced by new groupscheduler interface

From: Dhaval Giani
Date: Sat Dec 13 2008 - 23:59:26 EST



> applied to tip/sched/core, thanks Peter!
>

Also needs this to build,


sched: Fix compile errors introduced by new group scheduler interface

commit e642daa433a5ea1599965576dcea70dcc0a36608 introduces

kernel/sched.c: In function âcpu_nice_writeâ:
kernel/sched.c:8505: error: implicit declaration of function âsched_group_set_niceâ
kernel/sched.c:8505: error: implicit declaration of function âcgroup_tgâ
kernel/sched.c: In function âcpu_nice_readâ:
kernel/sched.c:8510: error: implicit declaration of function âsched_group_niceâ
kernel/sched.c: At top level:
kernel/sched.c:8822: error: static declaration of âsched_group_set_niceâ follows non-static declaration
kernel/sched.c:8505: error: previous implicit declaration of âsched_group_set_niceâ was here
kernel/sched.c:8833: error: static declaration of âsched_group_niceâ follows non-static declaration
kernel/sched.c:8510: error: previous implicit declaration of âsched_group_niceâ was here
kernel/sched.c:9103: error: conflicting types for âcgroup_tgâ
kernel/sched.c:8505: error: previous implicit declaration of âcgroup_tgâ was here
make[1]: *** [kernel/sched.o] Error 1
make: *** [kernel/sched.o] Error 2

Fix those.

Signed-off-by: Dhaval Giani <dhaval@xxxxxxxxxxxxxxxxxx>

---
kernel/sched.c | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)

Index: linux-2.6/kernel/sched.c
===================================================================
--- linux-2.6.orig/kernel/sched.c 2008-12-12 16:18:54.000000000 +0530
+++ linux-2.6/kernel/sched.c 2008-12-12 16:21:36.000000000 +0530
@@ -8499,16 +8499,7 @@ static inline void unregister_fair_sched
list_del_rcu(&tg->cfs_rq[cpu]->leaf_cfs_rq_list);
}

-static int cpu_nice_write(struct cgroup *cgrp, struct cftype *cftype,
- s64 niceval)
-{
- return sched_group_set_nice(cgroup_tg(cgrp), niceval);
-}

-static s64 cpu_nice_read(struct cgroup *cgrp, struct cftype *cftype)
-{
- return sched_group_nice(cgroup_tg(cgrp));
-}
#else /* !CONFG_FAIR_GROUP_SCHED */
static inline void free_fair_sched_group(struct task_group *tg)
{
@@ -9169,6 +9160,17 @@ static u64 cpu_weight_read_u64(struct cg

return (u64) tg->weight;
}
+
+static int cpu_nice_write(struct cgroup *cgrp, struct cftype *cftype,
+ s64 niceval)
+{
+ return sched_group_set_nice(cgroup_tg(cgrp), niceval);
+}
+
+static s64 cpu_nice_read(struct cgroup *cgrp, struct cftype *cftype)
+{
+ return sched_group_nice(cgroup_tg(cgrp));
+}
#endif /* CONFIG_FAIR_GROUP_SCHED */

#ifdef CONFIG_RT_GROUP_SCHED


--
regards,
Dhaval
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/