From: Michael Roth <mroth@nessie.de>
To: linux-kernel@vger.kernel.org
Cc: torvalds@linux-foundation.org, Michael Roth <mroth@nessie.de>
Subject: [PATCH] freezer: cleanup printk call sequences
Date: Thu, 28 May 2009 18:02:21 +0200 [thread overview]
Message-ID: <1243526541-2436-1-git-send-email-mroth@nessie.de> (raw)
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@nessie.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
reply other threads:[~2009-05-28 16:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1243526541-2436-1-git-send-email-mroth@nessie.de \
--to=mroth@nessie.de \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®