diff --git a/include/linux/freezer.h b/include/linux/freezer.h index c9435252e8e45e9cc9b7857cc7c4185359a51b7a..1045ee9c0bb45ab96c3794fb8b9a1697ff2e465a 100644 --- a/include/linux/freezer.h +++ b/include/linux/freezer.h @@ -63,8 +63,10 @@ static inline int thaw_process(struct task_struct *p) */ static inline void frozen_process(struct task_struct *p) { - p->flags |= PF_FROZEN; - wmb(); + if (!unlikely(p->flags & PF_NOFREEZE)) { + p->flags |= PF_FROZEN; + wmb(); + } clear_tsk_thread_flag(p, TIF_FREEZE); }