[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1243526541-2436-1-git-send-email-mroth@nessie.de>
Date: Thu, 28 May 2009 18:02:21 +0200
From: Michael Roth <mroth@...sie.de>
To: linux-kernel@...r.kernel.org
Cc: torvalds@...ux-foundation.org, Michael Roth <mroth@...sie.de>
Subject: [PATCH] freezer: cleanup printk call sequences
Correct and ease printk() interaction among freeze_processes()
and try_to_freeze_tasks().
Move printk("done") in thaw_processes() before schedule() to
prevent implicit interferences from it.
Signed-off-by: Michael Roth <mroth@...sie.de>
---
kernel/power/process.c | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/kernel/power/process.c b/kernel/power/process.c
index ca63401..f6bd3de 100644
--- a/kernel/power/process.c
+++ b/kernel/power/process.c
@@ -92,7 +92,7 @@ static int try_to_freeze_tasks(bool sig_only)
} while_each_thread(g, p);
read_unlock(&tasklist_lock);
} else {
- printk("(elapsed %d.%02d seconds) ", elapsed_csecs / 100,
+ printk("(elapsed %d.%02d seconds) done.\n", elapsed_csecs / 100,
elapsed_csecs % 100);
}
@@ -110,16 +110,12 @@ int freeze_processes(void)
error = try_to_freeze_tasks(true);
if (error)
goto Exit;
- printk("done.\n");
printk("Freezing remaining freezable tasks ... ");
error = try_to_freeze_tasks(false);
- if (error)
- goto Exit;
- printk("done.");
+
Exit:
BUG_ON(in_atomic());
- printk("\n");
return error;
}
@@ -148,7 +144,7 @@ void thaw_processes(void)
printk("Restarting tasks ... ");
thaw_tasks(true);
thaw_tasks(false);
- schedule();
printk("done.\n");
+ schedule();
}
--
1.6.0.6
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists