summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2011-12-08 23:21:25 +0100
committerRafael J. Wysocki <rjw@sisk.pl>2011-12-08 23:21:25 +0100
commit43753e58b16506f47bc2901e6a228445960b6ce7 (patch)
treeae00dbd77a3a9efbc9df8a6742caac693d3bd9df
parente5b16746f0f2d6883c226af52d90904ce0f7eee8 (diff)
parent467de1fc67d1bd2954eaac7019c564f28fa2b6a5 (diff)
Merge branch 'pm-freezer' into pm-sleep
* pm-freezer: PM / Freezer: Remove the "userspace only" constraint from freezer[_do_not]_count()
-rw-r--r--include/linux/freezer.h28
1 files changed, 11 insertions, 17 deletions
diff --git a/include/linux/freezer.h b/include/linux/freezer.h
index 30f06c220467..7bcfe73d999b 100644
--- a/include/linux/freezer.h
+++ b/include/linux/freezer.h
@@ -67,33 +67,27 @@ static inline bool cgroup_freezing(struct task_struct *task)
* appropriately in case the child has exited before the freezing of tasks is
* complete. However, we don't want kernel threads to be frozen in unexpected
* places, so we allow them to block freeze_processes() instead or to set
- * PF_NOFREEZE if needed and PF_FREEZER_SKIP is only set for userland vfork
- * parents. Fortunately, in the ____call_usermodehelper() case the parent won't
- * really block freeze_processes(), since ____call_usermodehelper() (the child)
- * does a little before exec/exit and it can't be frozen before waking up the
- * parent.
+ * PF_NOFREEZE if needed. Fortunately, in the ____call_usermodehelper() case the
+ * parent won't really block freeze_processes(), since ____call_usermodehelper()
+ * (the child) does a little before exec/exit and it can't be frozen before
+ * waking up the parent.
*/
-/*
- * If the current task is a user space one, tell the freezer not to count it as
- * freezable.
- */
+
+/* Tell the freezer not to count the current task as freezable. */
static inline void freezer_do_not_count(void)
{
- if (current->mm)
- current->flags |= PF_FREEZER_SKIP;
+ current->flags |= PF_FREEZER_SKIP;
}
/*
- * If the current task is a user space one, tell the freezer to count it as
- * freezable again and try to freeze it.
+ * Tell the freezer to count the current task as freezable again and try to
+ * freeze it.
*/
static inline void freezer_count(void)
{
- if (current->mm) {
- current->flags &= ~PF_FREEZER_SKIP;
- try_to_freeze();
- }
+ current->flags &= ~PF_FREEZER_SKIP;
+ try_to_freeze();
}
/*