Commit 1ac8ec27 authored by Petr Mladek's avatar Petr Mladek

Merge branch 'rework/kthreads' into for-linus

parents 51889d22 9023ca08
...@@ -3380,6 +3380,7 @@ static bool __pr_flush(struct console *con, int timeout_ms, bool reset_on_progre ...@@ -3380,6 +3380,7 @@ static bool __pr_flush(struct console *con, int timeout_ms, bool reset_on_progre
diff = 0; diff = 0;
console_lock(); console_lock();
for_each_console(c) { for_each_console(c) {
if (con && con != c) if (con && con != c)
continue; continue;
...@@ -3389,11 +3390,19 @@ static bool __pr_flush(struct console *con, int timeout_ms, bool reset_on_progre ...@@ -3389,11 +3390,19 @@ static bool __pr_flush(struct console *con, int timeout_ms, bool reset_on_progre
if (printk_seq < seq) if (printk_seq < seq)
diff += seq - printk_seq; diff += seq - printk_seq;
} }
console_unlock();
if (diff != last_diff && reset_on_progress) /*
* If consoles are suspended, it cannot be expected that they
* make forward progress, so timeout immediately. @diff is
* still used to return a valid flush status.
*/
if (console_suspended)
remaining = 0;
else if (diff != last_diff && reset_on_progress)
remaining = timeout_ms; remaining = timeout_ms;
console_unlock();
if (diff == 0 || remaining == 0) if (diff == 0 || remaining == 0)
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment