sched/fair: Cleanup: remove dublicate variable declaration
PATCH 1/1 sched/fair: Cleanup: remove dublicate variable declaration
cfs_rq is declarated twice. place_entity() doesn't change cfs_rq, so it's erratum. Fix that.
(and use above declarated se instead of &p->se)
Signed-off-by Kirill Tkhai <[email protected]>
CC Ingo Molnar <[email protected]>
CC Peter Zijlstra <[email protected]>
CC Steven Rostedt <[email protected]>
--- kernel/sched/fair.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
kernel/sched/fair.c +3 -5
@@ -5889,11 +5889,9 @@ static void switched_from_fair(struct rq *rq, struct task_struct *p)* and ensure we don't carry in an old decay_count if we * switch back. */ -if (p->se.avg.decay_count) { -struct cfs_rq *cfs_rq =cfs_rq_of (&p->se); -__synchronize_entity_decay (&p->se); -subtract_blocked_load_contrib (cfs_rq, - p->se.avg.load_avg_contrib); +if (se->avg.decay_count) { +__synchronize_entity_decay (se); +subtract_blocked_load_contrib (cfs_rq, se->avg.load_avg_contrib); }#endif }
tip-bot for Kirill Tkhai
merge bot[tip:sched/core] sched/fair: Cleanup: remove duplicate variable declaration
sched/fair: Cleanup: remove duplicate variable declaration
Commit-ID: 87e3c8ae1c8676b9dd56b56456dafa14a4bacf97 Gitweb: http://git.kernel.org/tip/87e3c8ae1c8676b9dd56b56456dafa14a4bacf97 Author: Kirill Tkhai <[email protected]> AuthorDate: Sun, 21 Jul 2013 04:32:07 +0400 Committer: Ingo Molnar <[email protected]> CommitDate: Mon, 22 Jul 2013 10:27:40 +0200
sched/fair: Cleanup: remove duplicate variable declaration
cfs_rq is declared twice, fix it.
Also use 'se' instead of '&p->se'.
Signed-off-by Kirill Tkhai <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Steven Rostedt <[email protected]>
Signed-off-by Ingo Molnar <[email protected]>
--- kernel/sched/fair.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
kernel/sched/fair.c +3 -5
@@ -5889,11 +5889,9 @@ static void switched_from_fair(struct rq *rq, struct task_struct *p)* and ensure we don't carry in an old decay_count if we * switch back. */ -if (p->se.avg.decay_count) { -struct cfs_rq *cfs_rq =cfs_rq_of (&p->se); -__synchronize_entity_decay (&p->se); -subtract_blocked_load_contrib (cfs_rq, - p->se.avg.load_avg_contrib); +if (se->avg.decay_count) { +__synchronize_entity_decay (se); +subtract_blocked_load_contrib (cfs_rq, se->avg.load_avg_contrib); }#endif }