hung_task-allow-hung_task_panic-when-hung_task_warnings-is-0-fix
[deliverable/linux.git] / kernel / hung_task.c
index dbf58050f3fa0f62e0cc33272046593d611bb5de..2b59c82cc3e1bb0813088cf5e22307d81230e13e 100644 (file)
@@ -101,14 +101,12 @@ static void check_hung_task(struct task_struct *t, unsigned long timeout)
        if (!sysctl_hung_task_warnings && !sysctl_hung_task_panic)
                return;
 
-       if (sysctl_hung_task_warnings > 0)
-               sysctl_hung_task_warnings--;
-
        /*
         * Ok, the task did not get scheduled for more than 2 minutes,
         * complain:
         */
        if (sysctl_hung_task_warnings) {
+               sysctl_hung_task_warnings--;
                pr_err("INFO: task %s:%d blocked for more than %ld seconds.\n",
                        t->comm, t->pid, timeout);
                pr_err("      %s %s %.*s\n",
This page took 0.029738 seconds and 5 git commands to generate.