*/
static inline bool proxy_needs_return(struct rq *rq, struct task_struct *p)
{
- if (!p->is_blocked)
- return false;
-
/*
* Typically per __set_task_cpu(), task_cpu(p) == p->wake_cpu.
*
return 0;
update_rq_clock(rq);
- if (p->se.sched_delayed)
- enqueue_task(rq, p, ENQUEUE_NOCLOCK | ENQUEUE_DELAYED);
- if (proxy_needs_return(rq, p))
- return 0;
+ if (p->is_blocked) {
+ if (p->se.sched_delayed)
+ enqueue_task(rq, p, ENQUEUE_NOCLOCK | ENQUEUE_DELAYED);
+ if (proxy_needs_return(rq, p))
+ return 0;
+ }
if (!task_on_cpu(rq, p)) {
/*
* When on_rq && !on_cpu the task is preempted, see if