diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2014-01-10 12:41:40 +1100 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2014-01-10 12:41:40 +1100 |
commit | b2c7a9d609dd79d65f2ff596ba9eff01ccb6bb62 (patch) | |
tree | e3806697bff6bc731ab44d7db58fca2fce4670fe /kernel | |
parent | e79248907e79dbec386bcaaf995d034abd834c79 (diff) |
printk-flush-conflicting-continuation-line-fix
simplify and condense the code
Cc: Joe Perches <joe@perches.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Arun KS <arun.ks@broadcom.com>
Cc: Arun KS <arunks.linux@gmail.com>
Cc: Arun KS <getarunks@gmail.com>
Cc: Kay Sievers <kay@vrfy.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/printk/printk.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 6378e07ab81c..b1d255f04135 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -1595,15 +1595,15 @@ asmlinkage int vprintk_emit(int facility, int level, * either merge it with the current buffer and flush, or if * there was a race with interrupts (prefix == true) then just * flush it out and store this line separately. + * If the preceding printk was from a different task and missed + * a newline, flush and append the newline. */ - if (cont.len && cont.owner == current) { - if (!(lflags & LOG_PREFIX)) - stored = cont_add(facility, level, text, text_len); - cont_flush(LOG_NEWLINE); - /* Flush conflicting buffer. An earlier newline was missing - * and current print is from different task */ - } else if (cont.len && cont.owner != current) + if (cont.len) { + if (cont.owner == current && !(lflags & LOG_PREFIX)) + stored = cont_add(facility, level, text, + text_len); cont_flush(LOG_NEWLINE); + } if (!stored) log_store(facility, level, lflags, 0, |