diff options
author | David S. Miller <davem@davemloft.net> | 2008-10-31 03:17:34 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-31 03:17:34 -0400 |
commit | a1744d3bee19d3b9cbfb825ab316a101b9c9f109 (patch) | |
tree | c0e2324c09beca0eb5782eb5abf241ea2b7a4a11 /kernel/freezer.c | |
parent | 275f165fa970174f8a98205529750e8abb6c0a33 (diff) | |
parent | a432226614c5616e3cfd211e0acffa0acfb4770c (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/wireless/p54/p54common.c
Diffstat (limited to 'kernel/freezer.c')
-rw-r--r-- | kernel/freezer.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/kernel/freezer.c b/kernel/freezer.c index ba6248b323ef..2f4936cf7083 100644 --- a/kernel/freezer.c +++ b/kernel/freezer.c | |||
@@ -121,16 +121,7 @@ void cancel_freezing(struct task_struct *p) | |||
121 | } | 121 | } |
122 | } | 122 | } |
123 | 123 | ||
124 | /* | 124 | static int __thaw_process(struct task_struct *p) |
125 | * Wake up a frozen process | ||
126 | * | ||
127 | * task_lock() is needed to prevent the race with refrigerator() which may | ||
128 | * occur if the freezing of tasks fails. Namely, without the lock, if the | ||
129 | * freezing of tasks failed, thaw_tasks() might have run before a task in | ||
130 | * refrigerator() could call frozen_process(), in which case the task would be | ||
131 | * frozen and no one would thaw it. | ||
132 | */ | ||
133 | int __thaw_process(struct task_struct *p) | ||
134 | { | 125 | { |
135 | if (frozen(p)) { | 126 | if (frozen(p)) { |
136 | p->flags &= ~PF_FROZEN; | 127 | p->flags &= ~PF_FROZEN; |
@@ -140,6 +131,15 @@ int __thaw_process(struct task_struct *p) | |||
140 | return 0; | 131 | return 0; |
141 | } | 132 | } |
142 | 133 | ||
134 | /* | ||
135 | * Wake up a frozen process | ||
136 | * | ||
137 | * task_lock() is needed to prevent the race with refrigerator() which may | ||
138 | * occur if the freezing of tasks fails. Namely, without the lock, if the | ||
139 | * freezing of tasks failed, thaw_tasks() might have run before a task in | ||
140 | * refrigerator() could call frozen_process(), in which case the task would be | ||
141 | * frozen and no one would thaw it. | ||
142 | */ | ||
143 | int thaw_process(struct task_struct *p) | 143 | int thaw_process(struct task_struct *p) |
144 | { | 144 | { |
145 | task_lock(p); | 145 | task_lock(p); |