mirror of
https://github.com/torvalds/linux.git
synced 2024-11-21 19:46:16 +00:00
freezer,sched: Clean saved_state when restoring it during thaw
Clean saved_state after using it during thaw. Cleaning the saved_state allows us to avoid some unnecessary branches in ttwu_state_match. Signed-off-by: Elliot Berman <quic_eberman@quicinc.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20231120-freezer-state-multiple-thaws-v1-2-f2e1dd7ce5a2@quicinc.com
This commit is contained in:
parent
5068d84054
commit
418146e398
@ -187,6 +187,7 @@ static int __restore_freezer_state(struct task_struct *p, void *arg)
|
||||
|
||||
if (state != TASK_RUNNING) {
|
||||
WRITE_ONCE(p->__state, state);
|
||||
p->saved_state = TASK_RUNNING;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user