Revert "PM: wakelock: Abort task freezing if a wake lock is held."
Arve Hjønnevåg [Sat, 17 Mar 2012 00:39:10 +0000 (17:39 -0700)]
This reverts commit dce3610a81ec6ef81ee90b2640d2dac7efcc0a15.

Change-Id: Icb94f687cda4cee22c8ca582dba60aa15b3c9e57

kernel/power/process.c

index 8fee8d0..7e42645 100644 (file)
@@ -16,7 +16,6 @@
 #include <linux/freezer.h>
 #include <linux/delay.h>
 #include <linux/workqueue.h>
-#include <linux/wakelock.h>
 
 /* 
  * Timeout for stopping processes
@@ -71,10 +70,6 @@ static int try_to_freeze_tasks(bool user_only)
                        todo += wq_busy;
                }
 
-               if (todo && has_wake_lock(WAKE_LOCK_SUSPEND)) {
-                       wakeup = 1;
-                       break;
-               }
                if (!todo || time_after(jiffies, end_time))
                        break;
 
@@ -96,24 +91,12 @@ static int try_to_freeze_tasks(bool user_only)
        elapsed_csecs = elapsed_csecs64;
 
        if (todo) {
-               /* This does not unfreeze processes that are already frozen
-                * (we have slightly ugly calling convention in that respect,
-                * and caller must call thaw_processes() if something fails),
-                * but it cleans up leftover PF_FREEZE requests.
-                */
-               if(wakeup) {
-                       printk("\n");
-                       printk(KERN_ERR "Freezing of %s aborted\n",
-                                       user_only ? "user space " : "tasks ");
-               }
-               else {
-                       printk("\n");
-                       printk(KERN_ERR "Freezing of tasks %s after %d.%02d seconds "
-                              "(%d tasks refusing to freeze, wq_busy=%d):\n",
-                              wakeup ? "aborted" : "failed",
-                              elapsed_csecs / 100, elapsed_csecs % 100,
-                              todo - wq_busy, wq_busy);
-               }
+               printk("\n");
+               printk(KERN_ERR "Freezing of tasks %s after %d.%02d seconds "
+                      "(%d tasks refusing to freeze, wq_busy=%d):\n",
+                      wakeup ? "aborted" : "failed",
+                      elapsed_csecs / 100, elapsed_csecs % 100,
+                      todo - wq_busy, wq_busy);
 
                read_lock(&tasklist_lock);
                do_each_thread(g, p) {