aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/printk.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/kernel/printk.c b/kernel/printk.c
index fbf4d0b22a1d..5ae6b09e3805 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -1496,15 +1496,14 @@ asmlinkage int vprintk_emit(int facility, int level,
1496 bool stored = false; 1496 bool stored = false;
1497 1497
1498 /* 1498 /*
1499 * Flush the conflicting buffer. An earlier newline was missing, 1499 * If an earlier newline was missing and it was the same task,
1500 * or we race with a continuation line from an interrupt. 1500 * either merge it with the current buffer and flush, or if
1501 * there was a race with interrupts (prefix == true) then just
1502 * flush it out and store this line separately.
1501 */ 1503 */
1502 if (cont.len && prefix && cont.owner == current)
1503 cont_flush();
1504
1505 /* Merge with our buffer if possible; flush it in any case */
1506 if (cont.len && cont.owner == current) { 1504 if (cont.len && cont.owner == current) {
1507 stored = cont_add(facility, level, text, text_len); 1505 if (!prefix)
1506 stored = cont_add(facility, level, text, text_len);
1508 cont_flush(); 1507 cont_flush();
1509 } 1508 }
1510 1509