[RFC 10/60] sched: Use parent_entity() in more places

From: Jan H. SchÃnherr
Date: Fri Sep 07 2018 - 17:46:20 EST


Replace open-coded cases of parent_entity() with actual parent_entity()
invocations.

This will make later checks within parent_entity() more useful.

Signed-off-by: Jan H. SchÃnherr <jschoenh@xxxxxxxxx>
---
kernel/sched/fair.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index bccd7a66858e..5d6225aedbfe 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -263,7 +263,7 @@ static inline struct task_struct *task_of(struct sched_entity *se)

/* Walk up scheduling entities hierarchy */
#define for_each_sched_entity(se) \
- for (; se; se = se->parent)
+ for (; se; se = parent_entity(se))

static inline struct cfs_rq *task_cfs_rq(struct task_struct *p)
{
@@ -9653,7 +9653,7 @@ static void propagate_entity_cfs_rq(struct sched_entity *se)
struct cfs_rq *cfs_rq;

/* Start to propagate at parent */
- se = se->parent;
+ se = parent_entity(se);

for_each_sched_entity(se) {
cfs_rq = cfs_rq_of(se);
--
2.9.3.1.gcba166c.dirty