Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 280371
b: refs/heads/master
c: 85f1d47
h: refs/heads/master
i:
  280369: fce6bd1
  280367: e956e13
v: v3
  • Loading branch information
Tejun Heo committed Nov 21, 2011
1 parent 1456026 commit 435d5a5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6907483b4e803a20f0b48cc9afa3817420ce61c5
refs/heads/master: 85f1d476653f52c97ca75466b2494e67c1cbd25d
3 changes: 2 additions & 1 deletion trunk/kernel/freezer.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ bool freeze_task(struct task_struct *p, bool sig_only)

spin_lock_irqsave(&freezer_lock, flags);

if (sig_only && !should_send_signal(p))
if ((p->flags & PF_NOFREEZE) ||
(sig_only && !should_send_signal(p)))
goto out_unlock;

if (frozen(p))
Expand Down
16 changes: 1 addition & 15 deletions trunk/kernel/power/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,6 @@
*/
#define TIMEOUT (20 * HZ)

static inline int freezable(struct task_struct * p)
{
if ((p == current) ||
(p->flags & PF_NOFREEZE))
return 0;
return 1;
}

static int try_to_freeze_tasks(bool sig_only)
{
struct task_struct *g, *p;
Expand All @@ -52,10 +44,7 @@ static int try_to_freeze_tasks(bool sig_only)
todo = 0;
read_lock(&tasklist_lock);
do_each_thread(g, p) {
if (frozen(p) || !freezable(p))
continue;

if (!freeze_task(p, sig_only))
if (p == current || !freeze_task(p, sig_only))
continue;

/*
Expand Down Expand Up @@ -181,9 +170,6 @@ void thaw_processes(void)

read_lock(&tasklist_lock);
do_each_thread(g, p) {
if (!freezable(p))
continue;

if (cgroup_freezing_or_frozen(p))
continue;

Expand Down

0 comments on commit 435d5a5

Please sign in to comment.