]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - kernel/printk.c
net/mlx4_en: Re-design multicast attachments flow
[karo-tx-linux.git] / kernel / printk.c
index fbf4d0b22a1d750928496524b07cf31d2b8327b1..dba18211685ed199b1ea88b9c2439ce8986a8656 100644 (file)
@@ -1496,15 +1496,14 @@ asmlinkage int vprintk_emit(int facility, int level,
                bool stored = false;
 
                /*
-                * Flush the conflicting buffer. An earlier newline was missing,
-                * or we race with a continuation line from an interrupt.
+                * If an earlier newline was missing and it was the same task,
+                * 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 (cont.len && prefix && cont.owner == current)
-                       cont_flush();
-
-               /* Merge with our buffer if possible; flush it in any case */
                if (cont.len && cont.owner == current) {
-                       stored = cont_add(facility, level, text, text_len);
+                       if (!prefix)
+                               stored = cont_add(facility, level, text, text_len);
                        cont_flush();
                }
 
@@ -2539,7 +2538,7 @@ EXPORT_SYMBOL_GPL(kmsg_dump_get_line);
  * kmsg_dump_get_buffer - copy kmsg log lines
  * @dumper: registered kmsg dumper
  * @syslog: include the "<4>" prefixes
- * @line: buffer to copy the line to
+ * @buf: buffer to copy the line to
  * @size: maximum size of the buffer
  * @len: length of line placed into buffer
  *