printk: kmsg_dump: remove _nolock() variants

kmsg_dump_rewind() and kmsg_dump_get_line() are lockless, so there is
no need for _nolock() variants. Remove these functions and switch all
callers of the _nolock() variants.

The functions without _nolock() were chosen because they are already
exported to kernel modules.

Signed-off-by: John Ogness <john.ogness@linutronix.de>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20210303101528.29901-15-john.ogness@linutronix.de
This commit is contained in:
John Ogness
2021-03-03 11:15:27 +01:00
committed by Petr Mladek
parent 996e966640
commit a4f9876532
4 changed files with 14 additions and 74 deletions

View File

@@ -2126,8 +2126,8 @@ static int kdb_dmesg(int argc, const char **argv)
kdb_set(2, setargs);
}
kmsg_dump_rewind_nolock(&iter);
while (kmsg_dump_get_line_nolock(&iter, 1, NULL, 0, NULL))
kmsg_dump_rewind(&iter);
while (kmsg_dump_get_line(&iter, 1, NULL, 0, NULL))
n++;
if (lines < 0) {
@@ -2159,8 +2159,8 @@ static int kdb_dmesg(int argc, const char **argv)
if (skip >= n || skip < 0)
return 0;
kmsg_dump_rewind_nolock(&iter);
while (kmsg_dump_get_line_nolock(&iter, 1, buf, sizeof(buf), &len)) {
kmsg_dump_rewind(&iter);
while (kmsg_dump_get_line(&iter, 1, buf, sizeof(buf), &len)) {
if (skip) {
skip--;
continue;